cancel
Showing results for 
Search instead for 
Did you mean: 

.NET picturebox convert to LabView image

SOLVED
Norick_17
Member

Re: .NET picturebox convert to LabView image

Message contains an image

...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

Hooovahh
Proven Zealot

Re: .NET picturebox convert to LabView image

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.

Norick_17
Member

Re: .NET picturebox convert to LabView image

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

yinyihai
Member

Re: .NET picturebox convert to LabView image

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

Hooovahh
Proven Zealot

Re: .NET picturebox convert to LabView image

Message contains a hyperlink

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

Re: .NET picturebox convert to LabView image

Message contains an attachment

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

Hooovahh
Proven Zealot

Re: .NET picturebox convert to LabView image

Message contains a hyperlink

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

billko
Proven Zealot

Re: .NET picturebox convert to LabView image

Message contains a hyperlink

@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.

Re: .NET picturebox convert to LabView image

Message contains an attachment

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.

psuedonym
Active Participant

Re: .NET picturebox convert to LabView image

Message contains a hyperlink

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