05-29-2013 10:39 AM
certain file formats are disabled in this forum e.g. you can't attach .bmps, too
but, yes I'm fine with the excel sheet!
the object extraction algorithm seems to produce valid values quite continously for each object.
have you considered to delete wrong pixels instead of swapping them?
I'd like to understand why or when this error occurs:
could you post the image - or draw a picture e.g. paint- from which the objects are meant to be extracted?
are you're objects liberated or do they touch each other on the picture?
05-29-2013 11:46 AM - edited 05-29-2013 11:49 AM
Hi,
I see what you mean, but in fact, it's not only one line. That can happen to much more.
I've attached a new XLSX (with a correction from the previous one) and better example with more than one swap.
I was close to succed to do it with complex but the VI sort by X first but that's not enough, I would like him to sort by X and Y (http://zone.ni.com/reference/en-XX/help/371361J-01/gmath/sort_complex_numbers/) -> in fact by the closest distance from 2 points. EDIT -> Maybe storing by magnitude can solve my problem here, I'm checking it.
Any idea, because I'm really stuck 😞 Also, don't forget number of objects isn't fixed to 3.
Thank you,
PS : Here is an explanation that might help you to understand why I encounter this problem.
05-29-2013 01:23 PM - edited 05-29-2013 01:25 PM
from your draft, it looks like as if your objects were moving.
do you want to trace objects in a video-sequence?
or don't the objects move?
if it was static, have you ever considered to do your own "object extraction" VI?
in this thread there's a quick'n'dirty implementation of the well-known flood-fill algorithm:
http://forums.ni.com/t5/LabVIEW/Floodfill-Algorithm/m-p/438947#M214627
05-29-2013 04:33 PM - edited 05-29-2013 04:33 PM
Yes objects move, the XY I'm giving you are the XY coordinates every frame. In fact, these objects are insects.
05-29-2013 05:11 PM
Do you also need to account for the case where the insects crawl or fly over each other? When this happens do you need to identify the individual insects or simply note the passage? Note that in your arrays from images this will be equivalent to some objects merging or combining and then splitting apart.
Lynn
05-30-2013 02:14 AM
Yeah, this is also one of my problem 😞 A huge one, I agree.
However, with a good threshold greyscale, we may avoid this because flies doesn't really use to climb on each other and doesn't stuck to each other.
In case it happens, I don't really know what to do. I posted on the Vision forum to have more informations about it; because I hoped that LabVIEW Vision was able to extract and follow objects, but I'm not sure anymore :S I don't think IMAQ Count Object can be set to remember objects frame after frame, unfortunatly 😕
05-30-2013 02:56 PM
Hello Sebastien,
after your explanations I made this VI, using complex numbers to calculate the nearest point. Perhaps it helps to sort the coordinates the right way.
05-31-2013 03:57 AM - edited 05-31-2013 04:12 AM
Zepiii wrote:..
because flies doesn't really use to climb on each other and doesn't stuck to each other.In case it happens, I don't really know what to do.
Well, if they really don't use to climb on each other and don't stuck to each other, they usually will die out 😄
SCNR
To your problem: Regard each fly (item) as an vector with position , moving direction and velocity (two complex numbers) . Now you can predict the new location and improve you relocation of the actual fly.
SO you keep a list (array) of flies and for each fly (array entry) you can calc the prediction.
With the list of new items you can calc the distances from new to old and new to prediction (for/to each item/fly) , give them a weigth. Use this weigth to identify old to new.
This will not work everytime to all items, some items migth leave or enter the FOV or other conflicts will rest. Sit back, look at yourself and analyse the way YOU use to solve this conflict.
06-01-2013 06:51 AM
Hi,
Thanks for your reply.
Can you save the VI as LabVIEW 8.6 ?
Thanks,
Sébastien
06-03-2013 04:30 PM
here you go