mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	fix mqtt snapshot
This commit is contained in:
		
							parent
							
								
									780ae7cd4f
								
							
						
					
					
						commit
						974f7bd0df
					
				@ -254,7 +254,7 @@ class TrackedObjectProcessor(threading.Thread):
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
        def snapshot(camera, obj):
 | 
					        def snapshot(camera, obj):
 | 
				
			||||||
            best_frame = cv2.cvtColor(obj['frame'], cv2.COLOR_RGB2BGR)
 | 
					            best_frame = cv2.cvtColor(obj['frame'], cv2.COLOR_RGB2BGR)
 | 
				
			||||||
            mqtt_config = self.camera_config.get('mqtt', {'crop_to_region': False})
 | 
					            mqtt_config = self.camera_config[camera].get('mqtt', {'crop_to_region': False})
 | 
				
			||||||
            if mqtt_config.get('crop_to_region'):
 | 
					            if mqtt_config.get('crop_to_region'):
 | 
				
			||||||
                region = obj['region']
 | 
					                region = obj['region']
 | 
				
			||||||
                best_frame = best_frame[region[1]:region[3], region[0]:region[2]]
 | 
					                best_frame = best_frame[region[1]:region[3], region[0]:region[2]]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user