<< return to Pixycam.com

Tracking several animals in a pen

Hello,
I am wondering if I can log the trajectories of different (around 7) animals across several hours. Is this possible?

I can provide more details if necessary.

Thank you.

Hello,
Pixy uses hue to detect objects. If you want to detect an animal, the animal should have a distinct color. White, black, gray, tan and brown are not good colors unfortunately because they don’t have a distinct hue.

What kind of animal are you trying to detect/log?

Edward

It would be small piglets. What if I paint some specific color markings or maybe strap them with some colored piece of plastic?

Could work! The marking / plastic would just have to stay visible to the camera.

Thank you! That is great, I would need to do some testings with the camera. What could be the possible output of the trajectories? Can I get a coordinates each sampling rate? I don’t need specifics for now but any documentation or a description about how the process would be laid out would be awesome.
Just for you to know, this is a typical environment where the footage might be taken https://www.youtube.com/watch?v=OrZzCg5ynHQ.
Best

Hello,
Pixy2 can output at up to 60 frames per second of data. You can reduce the framerate if there isn’t sufficient lighting. Pixy2 will output everything it detects for each frame.

Hope this helps!

Edward

Thanks @edge, what about this?

Thanks

To expand on what Edward is saying, Pixy reports this data about every 16.33ms:

  • pixy.ccc.blocks[i].m_signature The signature number of the detected object (1-7 for normal signatures)

  • pixy.ccc.blocks[i].m_x The x location of the center of the detected object (0 to 316)

  • pixy.ccc.blocks[i].m_y The y location of the center of the detected object (0 to 208)

  • pixy.ccc.blocks[i].m_width The width of the detected object (1 to 316)

  • pixy.ccc.blocks[i].m_height The height of the detected object (1 to 208)

  • pixy.ccc.blocks[i].m_angle The angle of the object detected object if the detected object is a color code (-180 to 180).

  • pixy.ccc.blocks[i].m_index The tracking index of the block

  • pixy.ccc.blocks[i].m_age The number of frames the block has been tracked.

You can write code to do anything you want with the data - in your case, display or calculate trajectories / vectors, or something else.

More info here: https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:arduino_api

Hope this helps!

Cheers,
Jesse

1 Like

Yes now it is much more clear, thank you very much!

All the best,
Luis