Identifying the position of a moving animal

OpenMV related project discussion.
xian
Posts: 2
Joined: Tue Oct 09, 2018 11:35 am

Identifying the position of a moving animal

Postby xian » Tue Oct 09, 2018 11:45 am

Hi there,

I just got one OpenMV cam 7 but i'm totally new to machine vision.
I need to use openmv cam to identify the position of an animal in the box. The box has left and right chambers, and the animal can freely go to either left or right side.
Once the animal was detected in each side, a TTL trigger will send out through different pins. Is there an example can do this kind project?
Thanks so much!

Xian
User avatar
kwagyeman
Posts: 3045
Joined: Sun May 24, 2015 2:10 pm

Re: Identifying the position of a moving animal

Postby kwagyeman » Tue Oct 09, 2018 12:25 pm

Hi, the easiest ways to do this are to use color tracking on the inverse of the color of the box. This will detect the animal. Is the box well lit? If so, then checkout the Color-Tracking Example scripts under OpenMV IDE and then use the Tools->Machine Vision->Threshold Editor to get the color tracking settings. Note that you want to pass the inverse flag to the find_blob() method to find everything not the color of the box.
Nyamekye,
xian
Posts: 2
Joined: Tue Oct 09, 2018 11:35 am

Re: Identifying the position of a moving animal

Postby xian » Tue Oct 09, 2018 1:36 pm

Thanks for the useful reply, i just tried and it indeed can track the moving animal. My following question is how do i know the position (or coordinate) of the moving animal?
User avatar
kwagyeman
Posts: 3045
Joined: Sun May 24, 2015 2:10 pm

Re: Identifying the position of a moving animal

Postby kwagyeman » Tue Oct 09, 2018 9:13 pm

Blob.cx() and blob.cy()
Nyamekye,
curry-te
Posts: 3
Joined: Mon Mar 18, 2019 10:22 am

Re: Identifying the position of a moving animal

Postby curry-te » Mon Mar 18, 2019 11:42 am

I would also like to tell if there is an animal in a scene but it is outside with clutter. I am thinking I would just like to know if the two images are similar (using the similarity class). Do you have any advice ? I think gray images would work.

Could I get similarity (similarity = fb.get_similarity(previousImage)) to use thresholds that are different for the top rows than the bottom rows. This is because the the top rows would mean that the animal is farther. I want to filter out smaller animals.
User avatar
kwagyeman
Posts: 3045
Joined: Sun May 24, 2015 2:10 pm

Re: Identifying the position of a moving animal

Postby kwagyeman » Mon Mar 18, 2019 11:55 am

The get similarly method is for perfect image to image comparisons.

Um, can you state your problem domain here? We specifically built the new H7 camera with thermal imaging support for this type of application so it's easy to do well and it will work in both night and day.
Nyamekye,
curry-te
Posts: 3
Joined: Mon Mar 18, 2019 10:22 am

Re: Identifying the position of a moving animal

Postby curry-te » Mon Mar 18, 2019 2:44 pm

Perfect, I pre-ordered the H7 yesterday.

Do you recommend the blob with the H7? I could generate a list of the blobs and compare these blob positions to see if the animals are moving. This will also allow me to know the row that the blob started so I can estimate animal size.

When will the thermal documentation (H7) be out?
curry-te
Posts: 3
Joined: Mon Mar 18, 2019 10:22 am

Re: Identifying the position of a moving animal

Postby curry-te » Mon Mar 18, 2019 3:05 pm

My system I am building cannot cost too much. I need to see if I can recognize animal movement without the thermal sensor.

Do you recommend the blobs with gray image?
User avatar
kwagyeman
Posts: 3045
Joined: Sun May 24, 2015 2:10 pm

Re: Identifying the position of a moving animal

Postby kwagyeman » Tue Mar 19, 2019 12:21 am

Hi, with a grayscale image you can do frame differencing to see what's changing against the background. This works well assuming there are no shadows and changing lighting.
Nyamekye,

Return to “Project Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest