Ask Your Question

assigning ID to individual blobs

asked 2016-07-25 02:31:42 -0500

Liphoto gravatar image

Please assist. Is there any way I can assign detected blobs ids such that I can then refer to each from any where else in my code. say I want the first blob detected to have an ID = 001, second =002, ..., nth = 00n.

edit retag flag offensive close merge delete


sturkmen gravatar imagesturkmen ( 2016-07-25 03:13:31 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-07-25 03:49:02 -0500

Liphoto gravatar image

That is the code I followed. I am unable to find out where the blobID is created if at all. I believe below is the code in which a new Blob is created

void addNewBlob(Blob &currentFrameBlob, std::vector<Blob> &existingBlobs) 

    currentFrameBlob.blnCurrentMatchFoundOrNewBlob = true;

in the with the blow function he checks if the line has been crossed. I would like to have the ID of each car as it passes the line

bool checkIfBlobsCrossedTheLine(std::vector<Blob> &blobs, int &intHorizontalLinePosition, int &carCount, VideoCapture& cap)

I am intrested in determining the speed of only the vehicles that have crossed the line. for that i am using a separate piece of code and would like to match a blobID to a carID

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-07-25 02:31:42 -0500

Seen: 237 times

Last updated: Jul 25 '16