Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Detection VI is not performing

Hello Everyone,

 

Actually, I am trying to detect the rectangle however Chris gave me a solution and I implement that one but I do not know why this is not working. I tried to do it in NI Vision assistant but some part specially detect the edges does not work while threshold, filters, lookup tables etc they work fine. 

 

What I am trying to do is, define my region of interest or active area, for this task, I used threshold to highlight the image more clearly. then detect the rectangle out of the image. It could be any solar module image but my program is still not working. I have to calculate the pixels of ROI area as well which is next step and I have 2 other stages to overcome but this detection stage has really letting me down. All my effects are wasted. Please can someone help me.

 

I have attached my main program and all the sub VIs can found on my this thread http://forums.ni.com/t5/Machine-Vision/Detect-the-rectangular/td-p/2370836.  However, I brought in some changes to threshold VI which is attached. 

 

Please can some one help.

 

Many thanks

Lazer 

 

Download All
0 Kudos
Message 1 of 8
(4,878 Views)

Hi Lazer,

 

Could you provide some more information of how your application is not working? How exactly can we help?

 

At which stage does it not work? When I run it I get

 

Error -1074395989 occurred at IMAQ ReadFile

 

Possible reason(s):

 

IMAQ Vision:  Unable to read data.

 

 

 

 

Error -1074396120 occurred at IMAQ Detect Shapes

 

Possible reason(s):

 

IMAQ Vision:  Not an image.

 

Is this because I don’t have the image you are using?

James O’Neill

NI

0 Kudos
Message 2 of 8
(4,850 Views)

Hello James,

 

I have attached my Image which one I am using. I have fix detecting the lines and lines has been drwan on the cell modules. What I did? I took the image of 8 bits without threshold and feed this one to " IMAQ Detect Lines" and it is working. However when its comes to detecting the rectangle as an one unit, the outcome is complete blank dark background. I thought, it could be because "IMAQ ExtractSingleColorPlane" need an image of 32 or 64 RGB and it is there and outcome still is black background. I do not know why. There is no error coming one. 

 

When you look it again can please tell me about how to assign co-odinates as well because I have declare the points for my active area as well. 

 

Hopefully, this will clear all the questions you asked.

Many Thanks

 

lazer

0 Kudos
Message 3 of 8
(4,847 Views)

Hi Lazer,

 

The image that you uploaded is just black, is it supposed to be?              

 

With regard to the output being dark back ground you could experiment with different colour plane inputs on the IMAQ ExtractSingleColorPlane VI.

 

To assign coordinates you could investigate using this VI: IMAQ Set Calibration Axis Info VI

 

Let me know how you get on,

 

James O’Neill

NI

0 Kudos
Message 4 of 8
(4,829 Views)

Hello James,

 

Thanks for reply. Image is 16 bits and Computer screen is 8 bits thats the reason for image is dark. To overcome this problem I created 64RGB VI and then contour and brightness programmed followed. After these I converted this 64RGB back into 8 RGB. 

 

I will use this advised VI for co-ordinate system and will let you know, if I unable to do it. 

 

Many Thanks 

lazer

0 Kudos
Message 5 of 8
(4,822 Views)

Hello Jmaes,

 

Sorry for saying this, I was unable to do co-ordinate system. I could not display four cornors of the image. Can you provide an example so that I can how to do it. I know how to do it in my brain but could not apply the method into the LabVIEW. 

 

Many Thanks 

Lazer

0 Kudos
Message 6 of 8
(4,809 Views)

Hello EveryOne,

 

I am working on co-ordinates system for 7 days and still didnot get any result. Need help! What I am trying to do is; I want to show the corners as my active areas, like { (0,0),(0,1),(1,0),(1,1)}. These corners will be my active areas of the image however so far I can not make any progress. Can someone please help. 

 

Many Thanks 

Lazer

0 Kudos
Message 7 of 8
(4,783 Views)

Hi Lazer,

 

I have been looking for some examples that might help you and this one may provide a good starting point:

 

https://decibel.ni.com/content/docs/DOC-4165

 

The VI actually extracts a section area of the image and displays it, it repeats this showing sections of the image until it has shown the whole image. It uses the Get Image Size VI which returns the resolution that you can use as x and y coordinates.

 

It also uses the IMAQ Extract VI to extract the section of the image you want. This would give you your “Active Area” you could then perform all the operations/manipulations you want on that section.

 

I hope this helps,

 

James O’Neill

NI

0 Kudos
Message 8 of 8
(4,770 Views)