From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Usb light microscope integration with Labview

Hello All,

 

I am new user here. I want to connect small Usb 2.0 microscope with Labview. For Example a cheap one, 5MP USB Microscope 20x-300x Digital microscope. In its specifications, Directshow is not mentioned. It does not provide any api for labview. It has its own software which can show images and video. Can i integrate it with labview, just for basic tasks like capturing pictures after every 10-20 seconds or something like that?

 

Thanks in advance.

0 Kudos
Message 1 of 9
(4,062 Views)

I assume that you had to install software on the computer for the microscope to work when connected to the computer.

Is that a single EXE or are there DLLs? If there are DLLs, do you have some documentation on it?

I recommend you to ask the vendor of the microscope if he provides an API which can be used by LV.

Please note that LV can interface with standard ANSI C based DLLs and .NET assemblies.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(4,056 Views)

Dear Norbert,

Thank you so much for your kind reply. In the software (Microcapture pro) package there is a dll file. But i don't know whether it will work with LV or not. Further, the vender does not provide any information regarding this. I have attached the screenshots of software package folder. If you need, i can also attach dll file. Can you please guide me whether this DLL file can be manuplated to work with LV.

Any help will be appreciated. Thanks you so much.

P.S: 2nd image shows files inside src folder.

 
Download All
0 Kudos
Message 3 of 9
(4,022 Views)

Hello Zahidkjatoi !

I looked a little into it, and I downloaded and installed "MicroCapture Pro". I obtained a different folder structure, but I do have a dll named "opencv_ffmpeg.dll" which seems similar to the one you have (I assume we simply have different version of MicroCapture Pro).

This dll do contain fuction which seems to do what you need (cvCreateFileCapture_FFMPEG,cvGrabFrame_FFMPEG, cvRetrieveFrame_FFMPEG, cvReleaseCapture_FFMPEG among others), but there is no documentation and you can't (reasonably easily) obtain the prototype. This dll is unusable.

However, I searched about the name of this dll "opencv_ffmpeg" and found it was part of an open-source package called "OpenCV : Open Source Computer Vision Library". You can download a windows build here : https://ffmpeg.zeranoe.com/builds/ and I suppose it will be compatible with your hardware. If it is, you should be able to use "ffmpeg.exe" (included in the downloaded zip)  with command line (syntax is included in the downloaded zip, in the help files), all this with Labview. You can see how to use command lines here : http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA

I recommend you to use the command line "-devices  Show available devices." For a start. I hope it will detect your microscope. Then you should read the "help files" to make sure it content what you need. I can't really help you furthermore since I do not possess your hardware.

Good luck !

 

 

0 Kudos
Message 4 of 9
(4,006 Views)

Dear Joannick,

 

Thank you so much for the effort and comprehensive reply. Let me download and check this dll file first. Can you kindly give me a link to MicroCapture pro from where you download it (In order to check if same version works for hardware). ?

I will reply as soon as i will get something or need to ask.

 

Thank you all.

 

Khan.

0 Kudos
Message 5 of 9
(4,000 Views)
0 Kudos
Message 6 of 9
(3,995 Views)

Dear Joannick,

 

I tried the method you suggested, but i couldn't get good outcomes. I think i could not understand how to use opencv_ffmpeg. The file in microcapture pro folder is opencv_ffmpeg.dll while the static version of opencv_ffmpeg gives me exe file. I try to execute microcapture pro using its executable file but it gives unknown errors. Also, i try to execute the same way as example given, but still it gives error.

Can you please explain me why this happens, or may be in details what should i do to control microcapture pro?

I will be thankful to you.

 

Khan.

0 Kudos
Message 7 of 9
(3,961 Views)

Here is what I have

0 Kudos
Message 8 of 9
(3,954 Views)

Dear Joannick,

 

I tried the method you suggested. It shows me exactly how you listed. But i couldn't find what i want. I try to change many command but all in vain. And i could not check whether my device is compatible with this opencv_ffmpeg file or not. As i could not see any outcome. Moreover, i studied all its corresponding help but i could not find relavant thing. 

I need to take pictures using labview from this light microscope (Just like frame grabber) but seems this ffmpeg is not suitable for this purpose.

Kindly guide me if you have any solution. I will be thankful to you.

 

Khan.

0 Kudos
Message 9 of 9
(3,935 Views)