LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

count pixels labview vision 2013

hi

i want to determined percentage of pixels in a region, like function count pixcels in NI Vision Builder AI but in labview vision 2013 

0 Kudos
Message 1 of 8
(2,728 Views)

All of the functions you can use in VBAI can be found in the Vision palette within LabVIEW.

 

I don't have Vision installed anymore but a quick search through that palette will probably help you.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 8
(2,599 Views)
You can also generate labview code from vision builder ai to see what the labview code looks like that calculates the percentage.

Hope that helps
Brad
0 Kudos
Message 3 of 8
(2,577 Views)

Brad, are you an expert on VBAI by any chance?

 

I worked on a project last year where I couldn't get the IMAQ outputs to match what I was seeing in VBAI (this was some OCR stuff I believe coupled with a few image operations). I even generated LabVIEW code from VBAI and copied the exact IMAQ VIs from there in the same order and it still didn't come out the same. Is this something you've observed before? It doesn't really matter anymore as I moved companies, but in the end I had to use the generated code all on its own without alteration, which I don't like to do because then a new developer has to use VBAI to change anything.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


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

hi

thanks for help

i think with IMAQ Count Objects 2 VI i can count pixels or with IMAQ Histogram VI 

 

0 Kudos
Message 5 of 8
(2,561 Views)
Hey James. I have not seen generated labview code behaving differently than vbai unless there's a bug. VBAI uses the same functions available in labview so you should be able to get the same results if you can get all the settings to match. Let me know if you're interested in finding out more and if you include your VBAI inspection and sample images as well as your labview code that works differently I could take a look and see what's different.

Thanks
Brad
0 Kudos
Message 6 of 8
(2,493 Views)

Brad, thanks for the response. I don't have access to the code anymore, I was more just curious about it. One of my old coworkers has actualy been in contact with me recently because he's the one who inherited my code. I had to walk him through how I implemented the VBAI code in to the main application because he couldn't just change a few setting inputs. It was more of just a inconvenience.

 

I guess my suggestion for the future would be for an option to output the VBAI code as LabVIEW code without all of the subVI hierarchy for those who are used to just using the IMAQ VIs. Just a linear set of code that goes from the start to fnish of the VBAI diagram that I could manipulate the way I want would be nice.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 7 of 8
(2,474 Views)
Thanks for the feedback. We have vision assistant for generating straight forward labview code. Another option is to use the labview API for VBAI to open inspections, run, and get results in labview from VBAI using simple high level functions in labview to control VBAI.
0 Kudos
Message 8 of 8
(2,448 Views)