LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a code in which i have to detect 3 objects

Hello everyone,

I am new in Labview. I want to make a code in which i have to detect 3 objects and they are in different shapes (rectangle, triangle etc).

1. How many objects in image.

2. What is the size of each object in image

3. At what position they are laying.

4. Data array of histogram of each object.

5. What is the color of each object.

Please help me out. I am confused with the tool. Which tool i will use for this Vision Assistant or Vision Builder AI or if i use labview directly to make the code what steps should follow to make this code.

Thanks

Zeeshan

0 Kudos
Message 1 of 9
(3,197 Views)

Your question is pretty general.

 

Are the types of shapes consistent?  Do you know the size?  Is it possible to get a template of what they should look like?  Do the shapes change every time?

 

The Machine Vision pallate has a count and measure objects VI which will work for general uniform blobs, but I don't think you want this.

0 Kudos
Message 2 of 9
(3,172 Views)

Hi,

Actually this is an example that i want to do before my project start. The shapes are not consistent in types. I just take the picture from net for processing it. And i not know the size. I attached the image you can see it. 

Thanks

Zeeshan

0 Kudos
Message 3 of 9
(3,167 Views)

Your question is way to general.

Did you start your poject yet?

If so, did you get stuck at any point?

My first advise for you is to use the Example Finder in LabVIEW.

Do you use the Vision Assistant or the Vision Application Builder?

 

Regards,

Adilo

0 Kudos
Message 4 of 9
(3,133 Views)

Hello,

Still i not start my project. This is the example to get a way of my project. I also saw the different examples in LabVIEW also both in Vision Assistant and Vision Builder AI. I work little bit in Vision Assistant for this example.

I take an image then measure it (length) and then put color segmentation block and so on. I test these blocks in Vision Assistant and then generate a LabVIEW code from there. But may be its not correct. So please tell me more what should i do next.

Thanks

zeeshan 

0 Kudos
Message 5 of 9
(3,120 Views)

Hello Zeeshan,

 

this is Vanessa, AE from Germany. I really like to help you with your project but like the other members already told you it would be easier if you have a certain problem.

Using your Shapes.jpg you have several options in the Vision Assistant. For identifiying circular objects of different size the tool "Find circular Edge" from the "Machine Vision" tab is the right choice (see screenshot attached). The result will be the center position and the radius so on. The pattern match function is not the right option because each of your objects has a different shape. In order to use this tool you need several copies of your object.

Do you really need colored images? For most application it is sufficient to use grayscale images. Be aware that some functions are only available for grayscale and your program will speed up.

Please tell us more details about your project.

 

Kind regards,

Vanessa

0 Kudos
Message 6 of 9
(3,093 Views)

Hello Vanessa, 

Thanks for support. Actually you not understand my post question. I want help for making the code that how should i carry the code. Now i am serching what i want for example,

1. for detecting the object i found IMAQ count object2 VI or IMAQ detect shapes VI palette in search box of LabVIEW.

2. for detemine the size of object, IMAQ find CoordSys 2 VI.

and so on for task.

and then i place the particular block of these VI has require. This is how i think about that. Is this right or not? For these task (as mentioned in my 1st post) these blocks or VIs is right one or not. I want the steps to carry on the example and make the VI.

I do hope you understand if not then tell me.

Thanks

Zeeshan 

0 Kudos
Message 7 of 9
(3,067 Views)

Hey Zeeshan,

 

I understand your post, but it is still imprecise. I really like to supoort you but I will not write the whole code for you.

The VI "IMAQ Detect Shapes" is the analogon to the function I used in the Vision Assistant screenshot. The output you will get is a cluster of the x- and y-position, the radius and the score. Using the drop down menu you can change mode from circles to lines and so on. This VI will search for a circle in the ROI (region of interest) which is an input to this VI.

The VI "IMAQ find CoordSys" does not give you the size of an object. In this case you are wrong. The VI needs a template and an image as input. The algorithm searches for the template and throws you the coordinates in the picture. It is therefore some kind of pattern matching. The size of the template has to be identical with the size of the copy in the picture you serach for.

If you prefer the Vision Assistant you can use it and convert the code into a VI. The VI can then be opened and modified in LabVIEW.

Please, try to build a code with some VIs and come back to me with your code. Then I will do my best to optimize your VI or give you some help to find VIs which fits your task better. I think this will be more efficient. Otherwise I can adivse you to look into some examples or to do some tutorials.

 

Regards,

Vanessa

0 Kudos
Message 8 of 9
(3,047 Views)

Hello Vanessa,

As you said in last email, i worked little bit on this example.

I saw in the labview example codes, under Vision, i found the Overlay example that very much similar to my requirements. Now i can move little bit forward to my task. Actually i want to detect the shapes which have arbitrary but in the labview there is no VI related to this so i think that if the shape is not ellipse or circle neither rectangle then it shows me as others. So that's the way i can detect the particular object and their shape, size, and histogram of that object in image. Can you guide me further that how can i do this. Initially i want only detect the arbitrary shapes then i can measure the size and histogram easily.

Thanks

Zeeshan 

0 Kudos
Message 9 of 9
(2,987 Views)