08-22-2013 08:52 AM
I've tried to convert my picture to a cluster ,but it still fail to read it
can someone help me ?
Solved! Go to Solution.
08-22-2013 11:10 AM
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
08-23-2013 07:45 AM
Thanks for your reply!
I put an error out and it shows imaq readfile has no problem.
This is my source code
08-23-2013 01:04 PM
Also, please tell me, what are you trying to achieve.
Thanks and best regards,
K
08-23-2013 09:16 PM
08-24-2013 04:37 AM - edited 08-24-2013 04:38 AM
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
08-24-2013 08:28 AM
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 it
08-24-2013 08:50 AM - edited 08-24-2013 08:50 AM
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
08-26-2013 01:18 AM
Hi,
The Img Dst input of your Express VI is not wired. Maybe the cause of your error.
Regards
08-26-2013 04:36 AM
Problem solved! Thank you very much!