Area changing

General discussion about topics related to OpenMV.
BriHu
Posts: 3
Joined: Mon Jan 28, 2019 2:47 pm

Area changing

Postby BriHu » Mon Jan 28, 2019 3:06 pm

An object stay's in the same place but when calling for the area with blob.area() the area ranges from 980 to 3450 pixels. What can I do to get the area to stay in a smaller range so i can do some distance math.

To recap - the area changes even though the camera and object do not. How do i fix it.
User avatar
kwagyeman
Posts: 2985
Joined: Sun May 24, 2015 2:10 pm

Re: Area changing

Postby kwagyeman » Mon Jan 28, 2019 4:04 pm

Hi, use the pixels() method. If area() is changing like that it means that you are picking up noise pixels which cause the bounding box to grow. Area() is based on the bounding box. pixels() is the number of pixels in the object.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 4 guests