mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	add max person area
This commit is contained in:
		
							parent
							
								
									e13563770d
								
							
						
					
					
						commit
						ceedfae993
					
				| @ -65,14 +65,17 @@ cameras: | |||||||
|         x_offset: 0 |         x_offset: 0 | ||||||
|         y_offset: 300 |         y_offset: 300 | ||||||
|         min_person_area: 5000 |         min_person_area: 5000 | ||||||
|  |         max_person_area: 100000 | ||||||
|         threshold: 0.5 |         threshold: 0.5 | ||||||
|       - size: 400 |       - size: 400 | ||||||
|         x_offset: 350 |         x_offset: 350 | ||||||
|         y_offset: 250 |         y_offset: 250 | ||||||
|         min_person_area: 2000 |         min_person_area: 2000 | ||||||
|  |         max_person_area: 100000 | ||||||
|         threshold: 0.5 |         threshold: 0.5 | ||||||
|       - size: 400 |       - size: 400 | ||||||
|         x_offset: 750 |         x_offset: 750 | ||||||
|         y_offset: 250 |         y_offset: 250 | ||||||
|         min_person_area: 2000 |         min_person_area: 2000 | ||||||
|  |         max_person_area: 100000 | ||||||
|         threshold: 0.5 |         threshold: 0.5 | ||||||
|  | |||||||
| @ -287,6 +287,11 @@ class Camera: | |||||||
|                 if region and 'min_person_area' in region and region['min_person_area'] > obj['area']: |                 if region and 'min_person_area' in region and region['min_person_area'] > obj['area']: | ||||||
|                     continue |                     continue | ||||||
|                  |                  | ||||||
|  |                 # if the detected person is larger than the | ||||||
|  |                 # max person area, don't add it to detected objects | ||||||
|  |                 if region and 'max_person_area' in region and region['max_person_area'] < obj['area']: | ||||||
|  |                     continue | ||||||
|  |              | ||||||
|                 # compute the coordinates of the person and make sure |                 # compute the coordinates of the person and make sure | ||||||
|                 # the location isnt outside the bounds of the image (can happen from rounding) |                 # the location isnt outside the bounds of the image (can happen from rounding) | ||||||
|                 y_location = min(int(obj['ymax']), len(self.mask)-1) |                 y_location = min(int(obj['ymax']), len(self.mask)-1) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user