LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET picturebox convert to LabView image

Solved!
Go to solution

...not yet working.

 

The problem is that my picturebox-refnum is not valid anymore when I try to get the image-property from the current picturebox. Have a look on following vi:

 

picturebox.png

How is it possible? Thanks

0 Kudos
Message 11 of 27
(5,478 Views)

Well it could be that in the Start Live function it is actually closing the picture box reference which would be strange.  I'd open up that code and see what it is doing, and see if there is a place where the image can be pulled out before it is closed.

 

I'd also experiment with trying to get the image at various stages in that sub VI or possible before that VI is called.  This is all reference based so in theory you don't need to get it over and over, just if the reference changes.

 

Also it looks like you aren't handling any errors, you should probably stop that loop on error, so you can see where the error is coming from, and possibly what the error is.  .NET errors are usually not very helpful other than saying a reference is not valid any more which you already know.

0 Kudos
Message 12 of 27
(5,461 Views)

Thanks for the answers Hoooovah

it looks like the reference has been closed in one of the sub-vi's. So far I could not find it...

I found a sub-vi from the vendors driver which "array to image". With this vi I am able to use directly the vi "IMAQ ArrayToColorImage VI" which has an input for this array. Makes everything much easier now.

 

 

Thanks

0 Kudos
Message 13 of 27
(5,441 Views)

I can display the dynamic images in PictureBox, but no image information in the PictureBox.Image attribute, how to solve?

0 Kudos
Message 14 of 27
(5,013 Views)

My post in this thread earlier showed how to load an image into a picture box, pull the data out bringing it into LabVIEW, then manipulating the image, then loading the new image back into the picture box.  This is done if you enable the Grey Out Image, which will divide the opacity by 2.

 

http://forums.ni.com/t5/LabVIEW/NET-picturebox-convert-to-LabView-image/m-p/3125944#M897890

0 Kudos
Message 15 of 27
(5,006 Views)

What is that VI with the TV screen and the ".net" right after the picture box node? I cant find it.

0 Kudos
Message 16 of 27
(3,626 Views)

It is the Get Image Data from Picturebox.vi that I attached in a demo showing how to load and scale an image that I linked to earlier.

 

https://forums.ni.com/t5/LabVIEW/NET-picturebox-convert-to-LabView-image/m-p/3125944#M897890

Message 17 of 27
(3,617 Views)

@Hoovah:

 

This was my goto thread to figure out how to display output from the arcade video game I am porting to LabVIEW for fun (and education).  I can get some fairly decent frame rates with little impact on CPU processing using your example as a guideline.

 

Belated hats-off to you!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 18 of 27
(3,604 Views)

OK,

I am using a thorlabs camera with the .net uc480 drivers which look identicle to the older ueye drivers. I got some of the camera settings to work with the help of people here. However. I cannot get the image into a usable format. I need an imaq image, a picture, an array, something. Ultimately I need numbers because this is an experiment. I have been trying this stuff for days. Reading every entry. None of the code shown here is working for me.

 

I added your code directly to the live capture from Thorlabs. I put an error output right at the place where the error occurs. I am sorry I am just not familiar enough with .net to know what to do next. I just want to get the numbers from the image.

0 Kudos
Message 19 of 27
(3,579 Views)

Posting screen captures is a very poor way to get help.

 

https://forums.ni.com/t5/LabVIEW/Connecting-to-a-Thor-labs-Camera-through-labview/td-p/3640821   may be helpful

0 Kudos
Message 20 of 27
(3,544 Views)