Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use a webcam to feed live values (or even better, an average of said values over time) into a subVI?

The values will be read from a digital measurement device, so there shouldn't be much of a problem in recognizing the fonts, I hope.

 

Ideally, it'd function like this: Webcam is trained on device, and without interaction from the user, labview processes the current data every 30 seconds, converts it to a string, and averages 30-second values over a period of 5 minutes. The average is then given to a VI that would normally poll the user for a value every 5 minutes. I'm trying to close the loop on a control system, and think this is the best way to do it.

0 Kudos
Message 1 of 10
(6,080 Views)

If I understand this correctly, you would like to take a picture of a screen every 30 seconds and read some text on that screen. You can do that using the NI Vision Development Module's Optical Character Recognition function palette. This will allow you to create a set of images of each character that you expect to read. You can then train the software to assositate an image of that character with the actual digital character. In this way, the software will be able to read the text. You can read more about this concept in the NI Vision Concepts Help manual.

 

Is there any other way to transfer the information from the first computer to the second computer other than using a camera to read the text off a screen? That seems like a strange way to transfer data, but it's possible that you don't have access to the code on the first computer and you can only access it from the front panel. Is that the situation that you are in?

 

Take care,

Jeremy P.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 10
(6,052 Views)
Yep! I'm using a sensor thats not compatible with labview. It might be possible to build out a PCB to rip the data stream directly, but I believe this would be a micer solution. Ideally, I would be able to "close the loop" on this system; allowing a user to just click Run and allow the controller to do its thing.
0 Kudos
Message 3 of 10
(6,049 Views)

That's unfortunate that you are not able to use the sensor with LabVIEW. Perhaps there is no LabVIEW driver for that sensor? If so, does the sensor communicate over a standard protocol like TCP, serial, etc.?

 

If you would like to, you can try a free trial of the Vision Development Module. https://www.ni.com/en/support/downloads/software-products/download.vision-development-module.html

 

Jeremy P.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 10
(6,033 Views)

The device does interface with some proprietary software through USB. As I understand it, it stores the data from a "run," and dumps it upon connection. So, if I could access the data just via LabVIEW (assuming it's not encrypted, which I think it probably is), I could probably set up a while loop that continually connects and disconnects the device, allowing continuous measurement to take place. 

0 Kudos
Message 5 of 10
(6,014 Views)

The USB device is probably communicating with the computer with a serial protocol. It is likely that you can use National Instrument's VISA driver to send and receive serial messages from the device. However, you would need to know the specific commands that the device needs in order to ask it for the information. For example, I once used VISA to communicate with a device that had a Get_position command, which instructed the device to return the current position of an encoder. NI-VISA can then read the value using the VISA Read VI.

 

Does this device have any documentation about these type of commands?

 

Jeremy P.

Applications Engineer
National Instruments
0 Kudos
Message 6 of 10
(5,999 Views)
Unfortunately it's made by a private company, so theres not much by way of technical documentation. Do you think it might be included in the patent? Are there other ways to recover the commands?
0 Kudos
Message 7 of 10
(5,995 Views)

I'm sorry to say that there isn't any way to know what these commands are for the device you're using. It doesn't have so much to do with the patent for device as much as how it was actually programmed.

 

The situation that you are in is actually fairly common. The manufacturer of the device wrote the firmware on the device as well as the driver and the application software. It doesn't sound like they intended for this device to ever work with anything else other than their own driver and application software.

 

Can you share with us a little about what this device is supposed to do? What is the device measuring? It is possible that we can help you find another solution.

 

Jeremy P.

Applications Engineer
National Instruments
0 Kudos
Message 8 of 10
(5,980 Views)
It's a dexcom g4 glucose monitor. I've set up OCR for the device, so its not the end of the world if this doesn't work. I've also been looking into packet sniffing, but I dont know the first thing about it or its legality. What other options do I have?
0 Kudos
Message 9 of 10
(5,976 Views)

I checked the Dexcom website and it looks like a really fun product. It also looks like you're right about not having a lot of documentation about the device. I don't believe that the manufacturers intended for this device to be able to comunicate with any other application other than their software. Perhaps you could contact them for more information. I'm sorry to say that I don't know what you should do to proceed from here. I do want to wish you good luck in this project.

 

Take care,

Jeremy P.

Applications Engineer
National Instruments
0 Kudos
Message 10 of 10
(5,943 Views)