Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive image edition/drawing tool with (Picture_Draw.llb). Is there any way to embed an image edition software to LabVIEW?

Solved!
Go to solution
Hello guys,



I've searched all NI Forum looking for an answer for my problem but as I couldn't find any I decided to create a new topic as it might also be of your interest.



First, my target is to allow the user to import an AIPD (*.apd) image or use a float array (with a 32bits float value per pixel/position) and graphically edit this image (at the moment I'm using a picture frame to get the mouse click position to alter my float array) using a airbrush tool (similar to what you have on Photoshop or GIMP, as it is shown in the attached images). The idea is to have the possibility to increase or decrease the values of my array image using 'white' or 'black' gradients (that's why I want airbrush and also because it should look like a "smooth" change).



A very important reason why I'm using AIPD is that I must work with float values ranging, in general, from 0 to 60000 (which are resulted from a pratical lab experiment so that I can't truncate or lose resolution casting to other IMG type).



Looking for similar topics and stories, I found two libraries that gave me an idea of how I should start (Paint Xcontrol, which unfortunately doesn't have a airbrush tool, and a very close solution for my problem which is Draw_Picture.llb from Finite Infinity website). This last llb can probably be very useful to other users so I'm also posting the original .llb (credits to the developer from the referred website).



The problem is that this .llb was developed to work with RGB images and not float image values and altought I have tried to find a work around to use it with float values (like having a multiplier factor), sometimes I have problems like in here (a 'black hole' in my image due to a wrong color conversion, instead of what I would like). I know it has to do with this problem of "adapting" it to float values, but I just can't figure out a way to solve it.



So I would like to ask if you guys have any idea on how should I proceed to solve my problem and also if there is any way I could maybe embed a image editing software such as Corel, Photoshop, GIMP, Paint.NET, etc to let the user interact and I use the resulted image in LabVIEW (I tried to find an ActiveX tool without success).



What I'm trying to do (Draw_Picture_float.llb), the original Draw_Picture.llb, and an example of float image im using ('img test.apd') are attached.



Thank you in advance for any help.



---



Diego Correia

Electrical Engineer

email: diego.correia-e-silva@bmw.de



Message Edited by Diego Correia on 02-02-2010 07:48 AM
Message Edited by Diego Correia on 02-02-2010 07:51 AM
Message Edited by Diego Correia on 02-02-2010 07:53 AM
Message Edited by Diego Correia on 02-02-2010 07:54 AM
BMW Group
http://www.bmwgroup.com
mailto: diego.correia-e-silva@bmw.de
Download All
0 Kudos
Message 1 of 3
(4,937 Views)
Solution
Accepted by topic author Diego Correia

Hi,

 

If you need to to work with float point gray images, then I would like to recommend to stay away from picture control and use IMAQ functions only (it seems to be that you have IMAQ Vision installed).

 

Try to use attached VI as starting point (the code partially not clear - was taken from llb above)

 

Andrey.

 

0 Kudos
Message 2 of 3
(4,892 Views)

Hey Andrey,

 

Thank you very for your fast reply, that was really it.

 

You gave me some new good ideas on how to use IMAQ functions and improve my code (thats much larger than that) work with my images (I'm still a beginner with image processing so I don't really know much how powerfull IMAQ is).

 

It's really tricky to deal with float images and pictures functions, I tried the most I could before got stuck, but it's always nice to have some experts helping us 😃

 

Cheers,

Diego

 

 

BMW Group
http://www.bmwgroup.com
mailto: diego.correia-e-silva@bmw.de
0 Kudos
Message 3 of 3
(4,796 Views)