Extract red image with Vision Builder Automated Inspection

Hello
I have 2 camera connected to a CVS and I want to process the images to have only the red part of the images.
for that I tried to use VBAI but I din't sucess, I think nit should be in the vision assistant step, but I already tryed with "extract a color plane" and "treshold color", and when I test with an image it don't work.
Does anybody know how to that?
Thank you for your help

Hello
I may be find a way to delete everythimg that is not red by substract green and blue with vision assisatant, it seems to work.
Now I try to extract only little part of the picture, only the part of the picture who are red, for that I created ROIs for some red parts of the images, and I want to record only this ROIs, to reduce the size of the file and kipping the same resolution.
Does anybody know how to do that?
I attach my Vision builder code to the message
Thanks for your help
Attachments:
Color Example red-21-7-12h30.vbai ‏108 KB

Similar Messages

  • Problem with Vision Builder and LabView: Error -1074395995, File not found

    I have created an inspection with Vision Builder AI 2009 SP1. In it I load some pictures from the HDD and run some checks over it. It works fine. Then I have migrated it to LabView 2010, I get a message that the migration is successfull, but when I run the VI on LabView I get a fail status. I have been checking my program and I have found and error when I try to load the picture from file: Error -1074395995 occurred at IMAQ ReadImageAndVisionInfo
    Possible reason(s): IMAQ Vision:  File not found.
    But I am not sure which file it refers to. At first I thought it was the picture I wanted to load, but I have checked the path and it is correct, so maybe it refers to another thing. What puzzles me most is that it works perfectly on Vision Builder and I have changed nothing in LabView, maybe it is a problem with the migration. Any clues?

    Here's a screenshot of what I'm talking about. Put a break point here and see what the path is and compare that with what Vision Builder AI is using (described where to find this in the previous post). You could find where this global is used to make debugging easier.
    Hope this helps,
    Brad
    Attachments:
    Generated Code.png ‏43 KB

  • Run time error running Vision Builder AI inspection from TestStand

    Hello,
    I have TestStand 3.1 and Vision Builder for AI v2.6.1.
    I would like to run from TestStand a Vision Builder Program or steps. For to achieve that, I have followed the instructions on Application Note 215, Running a Vision Builder AI Inspection from TestStand.
    After installation, the option in TestStand InsertStep>NI Vision Builder AI>Inspection works properly.
    But when try to execute a step with that inspection, and whatever operation of that one, the result is the following error:
    Run-Time Error
       Details: Error executing substep 'Post'.
    An error occurred calling 'ExecuteStep' in '_NIVBAITestStandSteps' of 'NIVBAITestStandAPI'.
       Error Code: -2147417851; User defined code. Possible System Error: The server sent an exception.
      At this point really I don´t know what to do, and I don't find any extra help apart of application note.
      I will appreciate some suggestion.
    Gonzalo.

    Hello,
    I've found some more information that may help.  Since these TestStand steps are simply call a DLL with an exported ActiveX API, path issues may exist.  In fact, the overwhelming number of times this error appears, paths seems to be the case. I am not sure why the error is an indication of a path issue, but that seems to be the case.  I would recommend that you would reregister the DLL, this time in the same directory as the example sequence.  To do this:
    - Unregister the current DLL by going to Start Menu>>Run, and typing: regsvr32 /u NIVBAITestStandAPI.dll
    - Move the DLL from the system32 folder to the folder in which the example sequence is saved.
    - Reregister the DLL from the run command (regsvr32 <folder path>\NIVBAITestStandAPI.dll)
    - Restart TestStand if it is open
    I apologize for not having any concrete answers, but this one is proving tough without me being able to replicate the issue.
    crisR

  • Registration of several reference images in a test image using vision builder

    I have downloaded the trial version of vision builder, and I am attempting a test to determine if it's worth buying:
    I would like to determine the position and orientation of two reference parts within a set of test images.  I am able to load the reference images, obtain the grayscale, perform appropriate filters, determine their global orientation based on some straight lines, and select the desired ROI's that I would like to match up.  I am also able to load in a test image, take the grayscale, and filter it.  My state diagram has three heads with the three loading steps that converge. This all seems to be great, but how do I find the position and orientation of the reference ROI's within the test image? 
    I would like to use something like the geometric matching tool, but it only seems to work on using a part of a first image on subsequent images in the same folder.  I suppose I could use my reference as the first image in the folder, then loop through the remaining ones, but...
    Once I find the position and orientation of the first reference in the test image, I would then like to find the position and orientation of the second reference in the same test image, then report values like relative distances and angles between these found references.
    Does this mean I need two folders, with their own reference image and the same set of test images?  Would I combine the geometric matching results using some variables or math functions?
    What is the best way to perform this image registration in vision builder?

    RSFree101,
    Thank you for your interest in Vision Builder AI.  If I understand what you are trying to do, you are looking to compare the position locations of two separate parts in an image.  We have a tool that does this very well.  If you use the pattern matching to find both instances of the part, you should be able to determine the distance and angle between them relatively easily.  To do this, you will need to find an edge in between the two so that you can justify the angle between them, and then simply use a few Geometry functions to actually find the angle.  To record this information, you can simply use a Data Logging step to write your findings to file.  
    If you are looking for a more complete analysis on how you might be able to do this, you will need the Vision Assistant on your computer (if you do not have it already, you can get it by downloading a free trial of our Vision Development Module).  In the Vision Assistant splash screen, click on the Solution Wizard.  This pulls up a menu.  From there, go to Tutorial » Bracket Inspection.  Click Load Solution.  If you step through that example, this displays how to do what you are looking to do with the Vision Assistant, but it should be no different at all in Vision Builder AI.  Hopefully this helps.
    Regards,
    Keith M.
    Applications Engineer

  • How can i compare two color images in vision builder for AI?

    What i want to do is to compare two images. I have a base color image that represents the desired colors and tones. I have another image to be compared to the base image. What i want to do is to compare this two images to know how close they are regarding contents of color and tones. In other words, i want to know how close is image 2 to image 1 (base sample)....
    I would like to know how to get the content of certain colors in an image and then compare this values with the same values from another image.
    For example..i have two sheets of paper that contain various mixed colors...i want to know the amount of green, red an blue in each image and then comapre this values.
    What i want to do is to compare difer
    ent samples of fabrics. this fabrics must be of a specified color...but due to the process they may vary in tone or even color...so i want to compare this fabrics to a amster sample to see how close they are in color and tone..
    Anything would help since i dont have experience in this type of comparisons...thanks

    VBAI allows you to work with grayscale images only. You can acquire an image, use the vision assistant to convert it grayscale by extracting the luminance plane (or any of the other color planes) and then analyze the resulting grayscale image. To do what you are talking about, though, it would really be better to get Vision for labview. You could then take color images, compare color plains, use statistical functions to determine average color values, and so on.

  • Red x with Flash Builder 4

    Hello!
    I have a Flex project and I need this to run in Flex SDK 4.5, because of a dependency of a library which needs 4.5.
    So I import the project into Flash Builder 4 (as an eclipse plug-in) and I get a "red x" on the left side of the project name in the "Project Explorer" of Eclipse. My problem is, I do not know where the problem is located, because no file is marked with a red x.
    The prject is based on BlazeDS and will be deployed to a Tomcat. The deployed folder only has the directories and the .mxml files, but not compiled .html / .swf files in it. But I did not get any error messages.
    Attached an image of the directory structure of my Eclipse/Flex project and the zip file of my project:
    http://ud05_188.ud05.udmedia.de/todo.zip
    Perhaps someone has an idea? How can I see what's going wrong?
    Best regards PHANTOMIAS

    I located the problem, I only have to take a look at the "problems" tab:
    unable to open 'C:/Users/phantomias/workspace/todo/WebContent/WEB-INF/flex/services-config.xml'
    That`s the error I have to handle.
    I read that is has to do with the compiler argument:
    - Properties - Flex Compiler - Additional compiler arguments:
    -services "C:/Users/phantomias/workspace/todo/WebContent/WEB-INF/flex/services-config.xml" -locale de_DE
    But what is wrong here?
    Best Regards.

  • Running Vision Builder AI Inspection from TestStand

    Hello, I have installed the

    Hello,
    I've found some more information that may help.  Since these TestStand steps are simply call a DLL with an exported ActiveX API, path issues may exist.  In fact, the overwhelming number of times this error appears, paths seems to be the case. I am not sure why the error is an indication of a path issue, but that seems to be the case.  I would recommend that you would reregister the DLL, this time in the same directory as the example sequence.  To do this:
    - Unregister the current DLL by going to Start Menu>>Run, and typing: regsvr32 /u NIVBAITestStandAPI.dll
    - Move the DLL from the system32 folder to the folder in which the example sequence is saved.
    - Reregister the DLL from the run command (regsvr32 <folder path>\NIVBAITestStandAPI.dll)
    - Restart TestStand if it is open
    I apologize for not having any concrete answers, but this one is proving tough without me being able to replicate the issue.
    crisR

  • Installing both Vision Builder 2012 and LabView 2012 on same Computer

    am new to NI Vision Builder Automation Inspection 2012 (Which I am supposed to learn and use for part inspection) as well as LabView (Which I need not know at this time)
    When I was presented (to work with) a 1722 Camera and the computer, Labview 2012 was already installed but not Vision Builder.
    The IT folks installed the Vision builder without uninstalling LabView.
    I have my problems getting upto speed with my inspection work, but is any of it attributed to both systems being on the computer?
    Can I (Must I) uninstall LaView??
    Thanks

    LabVIEW and Vision Builder run fine on the same computer.  I have several versions of each on mine with no problems.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Compatibility of developed Vision library with NI Vision Builder AI

    We developed a specific Vision library using NI LabVIEW and Vision Toolkit.
    My requirement is to identify the compatiblity of this library with NI Vision Builder AI.Can we use the existing VI's with Vision builder?
    Please provide me your comments asap.
    Regards:
    Vaibhav Kanchan
    Sr. Engineer
    NI Certified LabVIEW Developer(CLD)
    NI Certified TestStand Developer(CTD}

    There are multiple ways to add functionality to Vision Builder AI using a set of VIs you wrote:
    1) Vision Builder AI can run a VI you write that use your VIs using the Run LabVIEW VI step.
    2) You can also develop a custom step (that include the configuration page) for a better user experience, using the VBAI SDK, and use your VIs inside.
    With these 2 solutions, you will need to use a specific version of LabVIEW to integrate your library, as Vision Builder AI is a LabVIEW application, and VBAI will execute the code from the Run LabVIEW step, or custom step using the LabVIEW runtine engine that it was built with. The version of LabVIEW depends on the version of VBAI. For example, for VBAI 2011SP1, you need to use LabVIEW 2010.
    3) You can automate/drive Vision Builder AI from LabVIEW on Windows. (Open an inspection, run once, run continuously, etc, and get the resulting results and image that you can further process using your library. You can use the API on Windows with any version of LabVIEW.
    For example, the VBAI 2011 API supports LabVIEW 8.5 through 2011.
    You will run your developped application on Windows only, but it will be able to control Vision Builder AI running on remote targets.
    If you're running Vision Builder AI on Windows, I see no compatibility issues with any of the above solution, except for using the correct version of LabVIEW in the first 2 solutions I mentioned. Using 1) and 2), you will also be able to develop code that can run on targets that Vision Builder AI supports, like smart cameras, and embedded vision systems.
    If you plan to support remote targets, like smart cameras or Embedded Vision Systems, there are things to consider for your library to be compatible:
    These targets run different operating systems: some run Pharlap, some run VxWorks, all run LabVIEW real-time on these OSes. If you used LabVIEW and Vision Development module to build you library based on VDM, the only thing to consider is to make sure to use the same version of LabVIEW and Vision Development Module installed on the target. Let me explain:
    When you configure one of these remote targets from Vision Builder AI running on the Windows host machine, we install an image that contains a specific version of LabVIEW Real-time and Vision Development Module (For example, in the case of VBAI 2011 SP1, the remote target image has LabVIEW Real-Time 2010 and Vision Development Module 2011). Those should be the versions you need to use to create your VI to run with the Run LabVIEW step or custom step). We ran into some compatibility issues when customers update their Windows machine with a newer version of Vision Development Module, and write a VI or custom step they want to run in VBAI, that uses a new function that is not supported with the DLLs installed on the target.
    If your Vision Library uses some other DLLs (code you may have written in text based language or third party DLL), you will have to recompile the DLL for the operating system of the target (Pharlap or VXWorks, depending on the target) for the code to work on the remote target.
    Hope this helps and is not too confusing.
    Best regards,
    -Christophe

  • Vision Builder AI Vision Assistant issue with smart camera contrast

    I am using a NI 1776C smart camera with Vision Builder AI 2011.  The contrast is pictures in different from automated mode and running on the PC.  After using vision assisant to process an image (erode, color threshold, lookup), when I run this script from the pc I get a totally different contrast then when I save the script to the smart camera and run in auto mode.  Not sure why this is happnening.

    Did you change any of the camera settings in MAX when testing on the PC? Any change in lighting between the two? Would you post sample images please?
    Troubleshooting the Smart Camera in Measurements & Automation Explorer
    http://www.ni.com/tutorial/6881/en/

  • Problem with connect Ethernet camera to NI vision Builder

    Hi everyone!
    I have Airlive POE-100CAM. It is possible to connect camera with NIVB ?
    I want acquire image with this cam and inspect in NI.
    I connect to camera from other computer out from my site, but NI don´t see cam.
    Where is problem ?
    Thanks for your advice and sorry for my bad english.
    Frit
    Solved!
    Go to Solution.

    Hi Frit,
    how exactly are you searching for the camera? It is an IP camera, so it should be visible in MAX.
    What version of software do you have? Did you update the Vision Acquisition Software ( http://joule.ni.com/nidu/cds/view/p/id/2596/lang/e​n )?
    Regards,
    Mateusz Stokłosa
    Applications Engineer
    National Instruments

  • Acquire Image with two light sources

    Hello
    I am using a NI 1772 camera with Vision Builder AI. I have an acquire image function which has an external trigger. The lighting fixture is to an advanced illumination pulsar 320 strobe control and I have two different lighting sources; Axial Diffuse Illuminator DL37100 and DL097. My final goal is to acquire crisp images of caps. The caps are coloured from white to black, where the DL37100 picks out the Dark colour caps and the DL097 can pick out the white caps. I have a program that automatically adjusts the exposure time based on the colour.
    Is there a way I can trigger the acquire image, and have the inspection take two images of a cap and determine which lighting source to use?

    Instead of a dedicated circuit/hardware for this you could try using the on-board pulse generation functionality to do this. You could do something where one pulse generator is triggered by your outside source, and it generates a continuous pulse train of your frame rate. You'd then pass that output to an input that is triggering another pulse generator with a re-armed pulse with a delay of 1 edge count. The output of this would then effectively be for every other image. You'd then combine this with a single-shot, 2-image acquisition that is triggered off that intermediate pulse train. You'd have to make sure you stop the pulse train between each single-shot acquisition. Keep in mind that loop-back between output and input requires a pull-up resistor.
    Note: I haven't tried this Rube Goldberg mechanism described above myself, but it seems like it could work
    Eric

  • Defining Centroid with Vision AI in VB

    I'm usnig NI Vision Automated Inspection.  Any centroid related help that I've found references the centoid function for the development software.  
    Can anyone point me in the right direction for using NI Vision AI to write VB code to acccomplish this? 
    I've already gotten the acquisition up and running. 
    Thanks, 
    Bryan 

    It sounds like there is some confusion about Vision Builder AI and the Vision Development Module (where Centroid2 can be used). Vision Builder AI is a configurable environment for designing Vision applications. It has a step called Detect Objects that allows you to specify threshold parameters and particle filtering data to remove unwanted objects and it returns data for all the resulting objects found (including the center of mass). You can control a Vision Builder AI engine that is running on your local machine or on a remote target using the Vision Builder AI API. We recently released C support for this API in Vision Builder AI 2011, which includes a dot net example for C# and VB. This would allow you to retrieve the results for the detect object step, but the algorithm would run in the Vision Builder AI engine. Using this method would tyopically mean that all your image processing/acquisition happen within Vision Builder AI, and you just use Visual Basic to control when the Vision Builder AI engine acquires an image and processes it, but you couldn't control which algorithms it runs since this can only be defined from within the Vision Builder AI environment when you create an inspection.
    The Vision Development Module is a set of vision algorithms that are meant to be called from programming languages like LabVIEW, CVI, VB, MSVC, etc. It sounds like you are using this library in Visual Basic, and if this is the case, you don't need Vision Builder AI to do the detect object step since this will go through many other layers of SW to accomplish what you want, and calling the Vision Development algorithms directly will be much more direct. Is there a reason you want to use Vision Builder AI instead of the Vision Development Module algorithms included in the ActiveX control it sounds like you are using? To get help on the ActiveX Vision Analysis library, you can go to Start>> Programs>>National Instruments>>Vision>>Documentation>>NI Vision and open the cwimaq.chm.
    If all you're doing is trying to find the center of mass, using the Vision Development Module is much more straight forward than trying to create a Vision Builder AI inspection, which you control from Visual Basic and get the resuls of the inspection to figure out the center of mass from one of the steps in the inspections.
    Hope this helps,
    Brad

  • Send variable from vision builder to NXT Brick

    Hello,
    I have a color sorting machine controlled by an NXT Mindstorms brick. I believe that Labview has a module to communicate with the Lego brick, but I was wondering if the Vision Builder (which we are currently using for another application) could also communicate with the brick (we don't have Labview). Ultimately, after insecting the object with Vision Builder, I would like to send a variable (based on the inspection) to the NXT mailbox, preferably via usb, otherwise BT, that would serve as a motor command for the servo. If there is no such communication module, is there a code that I could insert into the Vision Builder program that would allow for such a communication?
    Solved!
    Go to Solution.

    Hi there,
    As far as I know, Vision Builder will not be able to "target" the Lego Mindstorms brick.  
    The LabVIEW add-on for Lego Mindstorms can be found here:  http://zone.ni.com/devzone/cda/tut/p/id/4435
    I'm assuming you're planning on connecting your camera to a PC? 
    Although I just found a camera that can connect directly to the Lego brick here:  http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=78
    If your LabVIEW code is running on your PC, you should be able to use either vision builder or vision assistant and then have your brick "do something" based on the results.  You'll have to choose your PC as the "target" for your code and you will need LabVIEW and the Mindstorms add-on to make this work.
    Patrick Allen

  • 使用 Vision Builder AI 讀取 NI-1722 影像

    Hello
    我有一個視覺檢查的專案,早先是使用 IEEE 1394 camera
    配合 Vision Builder AI 3.6 所寫成,最近更換為 NI-1722
    Smart camera , 但更換後發現我只能使用 remote target 的模式
    去存取 NI-1722 , 於是就將設定移轉至 NI-1722 ,但執行工作時
    發現檢查速度非常的慢 。
    請問有什麼方可以由NI-1722讀取影像,就像原有的 IEEE-1394 或
    GigE 的模式,而非 Smart camera remote target 的模式,
    並將工作設定於本地的 PC 內執行。
    另外 我發現了Smart Camera 及 Vision Builder AI
    的功能規格上有這一段的描逑,我應該如何設定才可達成
    With Vision Builder AI, you can perform the following tasks:
    Acquire and process images with any NI frame grabber
    NI Compact Vision System, NI Embedded Vision System
    NI Smart Cameras as well as GigE Vision, IEEE 1394 cameras
    and USB DirectShow cameras
    謝謝......

    http://forums.ni.com/t5/Machine-Vision/Logging-an-​image-on-the-local-drive-using-Vision-Builder-2010​...
    http://forums.ni.com/t5/Machine-Vision/Save-images​-on-NI-Smart-Camera-1742/m-p/1574514
    Saving images to disk is discouraged on the smart cameras because of the number of writes to disk that can occur before the disk fails.
    所以看起來在PC端把Smart Camera當成GigE相機,這樣的應用是不被建議的。
    給您參考一下。

Maybe you are looking for