02-10-2016 08:24 PM
Hi Every professional experts out there,
I got a big image processing issue worried me about couple months now, please help me with your brilliant idea.
Operating system: Windows 8
NI platform: NI VBAI 2013 SP1
Camera: NI smart camera 17XX
Question: I want using NI Vision Assistant from VBAI separate/segment certain area (yellow line) from pork loin images. But i tried every possible ways i knew, still didn' get a really good result.
So please someone give me some ideas how to processing these image to get the target area i want.
Thank you so much!!
Solved! Go to Solution.
02-11-2016 07:09 AM
Do me a favour and post the images without the yellow markers too?
I have some idea, but I'd like to test it with the source images... Have you considered using LabVIEW vis instead of the VBAI ... which is fairly limited in scope?
Birgit
02-11-2016 08:36 AM
Well we can figure out a way to run .VI in the VBAI right?
Here is the original picture.
Thanks
Rex
02-12-2016 04:40 PM
Hi Rex,
I've thought about this and this is a fairly tough application. The human eye can pretty quickly pick out what you're trying to find, but I think that's based on the change in texture as opposed to an actual edge.
My thought goes along on that same pathway - maybe figure out a texture value for different parts of the image, and then convert the image into a binary image based on some threshold to expose the particular area of pork. This VI is the main one of interest for me: IMAQ Extract Texture Feature.
The issue with this is defining ROIs small enough to provide the granularity you're looking for, but large enough to actually detect a meaningful texture. Additionally, this means you'd have to pull out the texture for many (100's to 100,000's) ROIs, which would take a lot of processing.
02-12-2016 09:35 PM
Hi Andrew,
Thanks for reply.
Texture feature might be the first option to extract the area, i agree with you, but that indeed is a farily tough job.
So i have an idea, see i can let the loin direction stay the same, the area i want can keep on the left of the image.
Could we just creat a ROI area based on the size of the loin, and cut out an area which can fall in to the yellow mark. That will work too.
How could we auto dectect the different size of the loin and define a ROI on centain position? could you help me to do that?
02-15-2016 06:23 PM
Hi Rex,
You could do something like this – you could identify edges (not sure if you’d want to find top and bottom edges as well as left and right). Based on the image you uploaded, this should be relatively painless. Once you have these edges, you can determine an approximate size by measuring the distance(s) between them. From this, you can extract some idea of size – whether it be thickness or a rough idea of loin area. You could also use these edges to define a coordinate system, and then define a ROI relative to that system.
Is this what you had in mind?
Also, do you have any higher definition images you could upload?
02-16-2016 01:23 PM
Hi Andrew,
The edges plus Coordinate system define the ROI seems to be the best idea right now. And i tried to setting the steps according your advise, the result shows not really bad. I think i am gonna using this method right now.
So i got one more question, if i extracted some value from the image, now i want sort this image and show the result according this value. For example,
I tried the step Caculator and Custom Overlay, but just couldn't get the result out.
And about the defination images, i took the images using NI smart camera, the image solution is 1500*600, this is the highest solution i can get.
Rex
02-17-2016 12:20 PM
Here's a sample inspection in Vision Builder AI 2014 that uses the magic wand feature of the ROI step, with some filtering in the detect object (you can add more filtering if you want to filter on more criteria than just size (i.e. shape of the particle). Then I use some variable (feel free to replace with your method for figuring out the score) to determine a grade and overlay it.
Hope this helps,
Brad
02-18-2016 08:45 AM
Hi Brad,
Thanks for replying and the program.
I thought and used magic wand function before, the issue is the loin size are different, and position are different as well. So it usually fit this picture, but not fit for next one (over or less recognize the area).
Right now i am using the edge plus coordinate idea to locate the ROI, and works fine, some picture still out of the area, but this way is the best way up to now.
If you have any other idea, please advise and once again, really appreciated it.
Rex
04-06-2016 06:54 AM
u might wan to test with more image with the attached vbai.
edge -> threshold -> particle filer -> morphology
u can play with numbers in some of the step to get a more consistent output
thx