Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

vision assistant can't read my picture

Solved!
Go to solution

I've tried to convert my picture to a cluster ,but it still fail to read it

can someone help me ?

 

question3.png

0 Kudos
Message 1 of 11
(5,056 Views)

Hello,

 

put a probe after the "IMAQ read file" and see the output. If the output is a valid image, then re-check the code generated by NI Vision Assistant.

 

You could also attach the code and i will take a look at it.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 11
(5,051 Views)

Thanks for your reply!

I put an error out and it shows imaq readfile has no problem.

This is my source code

0 Kudos
Message 3 of 11
(5,042 Views)

Also, please tell me, what are you trying to achieve.

 

Thanks and best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 11
(5,030 Views)

question4.png

0 Kudos
Message 5 of 11
(5,022 Views)

Hello,

 

thank you for the diagram, but this gives me no additional information about your end goal application. It is basically the same as the code you posted before.

 

The reason i asked for some information about your application is that i don't quite understand your code.

 

First of all, you are doing "color thresholding" but your input image is only 8-bit. Next, you are removing border objects and because the object (circle) is touching the borders, it is removed. In the next step you are performing erosion with 20 iterations - if you have not previously removed the circle, this will certainly remove it, even if it is not touching the borders. In the last step, you are then searching for shapes without the template, right? This is the "not an image" (with the combination of wrong image type) or "the image is not large enough for the operation" error that occurs.

 

Why performing on RGB (or HSV) image? Why not just grayscale?

 

Please see the attached code. If you have ny questions, please ask. Also, if i missed anything, let me know.

 

Best regards,

K

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 6 of 11
(5,008 Views)

Sorry for misleading ,I didn't modify the condition I want to search.

 

The image processing part can be ignored, the question is that vision assistant.vi only read a purple string.

 

I got a vi that can transform a U16 array into a 2D picture, which is a blue line.

 

How do I transform it into a feasible purple data?

 

It always shows an error when the IMAQ vision read itquestion.png

0 Kudos
Message 7 of 11
(5,002 Views)
Solution
Accepted by topic author 123321123

Hello,

 

this is really strange as the code works without any errors for me. Did you specify the template path also?

 

Anyway, at least now i know what is your problem - i am attaching the code to convert 2D picture to IMAQ image.

 

Best regards,

K

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 8 of 11
(4,999 Views)

Hi,

The Img Dst input of your Express VI is not wired. Maybe the cause of your error.

Regards

0 Kudos
Message 9 of 11
(4,988 Views)

Problem solved! Thank you very much!

0 Kudos
Message 10 of 11
(4,980 Views)