06-30-2019 11:55 PM
Can I know is there any tutorial for us to configure the webcam and running a VI to stream video via myRio FPGA? The online resources are mostly dealt with myRio but not FPGA itself. I work with my teammates and we are totally begginer in LabView. We already successfully streamed video through webcam (Logitech C270) using myRio but the problem we faced was the frame rate kept fluctuating between 15 to 30 fps. Though the quality of the streaming was not bad (video resolution is pretty good), but you can see white flashes kept flickering. So, we thought of using FPGA as it's faster and helps reducing delay. Is it hard to create a FPGA VI for video streaming ourselves? Is there a big difference between creating normal myRio VI and FPGA VI?
07-01-2019 03:28 AM - edited 07-01-2019 03:31 AM
@rayjasson wrote:
Is it hard to create a FPGA VI for video streaming ourselves? Is there a big difference between creating normal myRio VI and FPGA VI?
Yes it's definitely hard! While you can program FPGA from within LabVIEW the functionality behind it is entirely different and that means also that there are things that can be implemented easy (such as fast logic) and things that are extremely difficult (like image processing which requires huge amounts of memory and you need to realize that every single bit of memory storeage is in terms of FPGA a full register of which you don't have millions of them in your FPGA core). So some things require completely different algorithmes when done in FPGA to reduce the amount of needed registers extremely.
Also the FPGA core on the myRIO is not really suited for accessing an USB device directly. While you could theoreticaly implement a simple USB device interface in FPGA it won't leave much room for other logic on the FPGA and it won't be a complex device profile like a USB VID device. You also would have to somehow create an external USB PHY for that (PHY is an abberviation for physical layer, that's the device that provides the logic level, signal conditioning, data path seperation and filtering as well as ESD and other input protection of an interface like USB or Ethernet).
If you want to use the build in USB port you won't be able to route that directly to the FPGA without very serious reprogramming of the NI Linux device driver setup on the myRIO.
In summary what you want to do is pretty much doomed unless you are willing to dive all the way into the hardware and get a Linux expert at the same time too, which would be a lot more work than what you have available for your class.
07-01-2019 05:52 AM
To add to that, you'd usually try to get the best our of both.
So if there are things that are heavy on the myRIO, you can perhaps delegate those tasks to the FPGA. In this case, you might have some luck in streaming data to the FPGA, handle it there, and stream it back to the myRIO.
The required speed and the amount of data makes this hard...
If you post the myRIO code that's flickering, we could have a look at that. Sometimes a few simple tweaks is all it takes.