Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

movie frames generation in c++ from binary data and/or files

Status
Not open for further replies.

syedshan

Advanced Member level 1
Joined
Feb 27, 2012
Messages
463
Helped
27
Reputation
54
Reaction score
26
Trophy points
1,308
Location
Jeonju, South Korea
Activity points
5,134
hello every one,

I have taken a data from ADC-> FPGA-based-system -> .bin file in computer

Now I need to read this .bin file and generate a still frame for a frame consequently I need to generate the 2D movie with N*M number of files that I get through ADC,
Any idea how to do it on C++

Please note that since it is in binary format, I don't exactly need to save it either and can generate frame as-it-is as well as soon as data is obtained in PC buffer.

My basic searches suggest me of the following libraries.

1. QT
2. GIL
3. OpenCV

Does boost libraries help in this matter.

But not sure at this stage what to use. Any other idea would be appreciable

thanks
 

Did you look among your C software package? Maybe it has the routines you need in the examples folders. (The video routines I was interested in were split up among more than one folder of the BASIC programming environment which I use.)

Do your files have one image per file? Then you will have to write code that lets you:
1) navigate to a folder
2) open it
3) read all file names
4) open them in sequence
5) display each image for a fraction of a second
6) go on to read the next file

Also do you need to do it in C++?
Because if your bin files match a recognizable format (such as GIF, etc.), then there is a chance you could use an existing utility, to combine all your images into an animated GIF.
 

no. there are not such examples available since the main purpose of the board is to tell how to control ADC, FPGA, DDR3 so only codes related to that are available.

More over I have one more thing in mind. When I receive the data in the from the FPGA in the already allocated memory location and later save in file, I want to directly generate the frame(and later movie, since each frame is part of a movie) from the data available in the allocated memory.

I do not have any image in the file. It is just the sensor data I am getting from the ADC/FPGA combination.
and yes I need to do it in c++ since the API for the board I am using is in c++ and I need to make the real-time system. Otherwise previously I was using Labview to generate the movie as the outside software.(which is really slow).


Because if your bin files match a recognizable format (such as GIF, etc.), then there is a chance you could use an existing utility, to combine all your images into an animated GIF.

I understand the gif point, but can u explain it in this situation a little

thanks for reply
 

I do not have any image in the file. It is just the sensor data I am getting from the ADC/FPGA combination.

Then it will not be a recognizable graphics format such as GIF, PICT, PNG, BMP, TIFF, etc.

You will need to learn how to create the image onscreen. You'll need to plot each pixel, draw each shape, etc.

I do not know C programming. The commands are doubtless different from BASIC commands such as PLOT, LINE, BOX, CIRCLE. In addition you'll need to set up a window size, type, color mode, etc. You need to scale your data to fit the size of your screen. Etc.

The necessary commands may or may not be in the version of C++ used in your module.
There may or may not be the command which records everything that you draw to screen...
and a command which converts the drawn image into a single file as a GIF (or PICT, etc.)...
and a command which saves it to disk as a file which is usable by other applications.
 

You will need to learn how to create the image onscreen. You'll need to plot each pixel, draw each shape, etc.

this is the thing I am looking for.

I find two popular libraires

1. QT
2. boost

but I think QT is more of use...

any other idea would be appreciable
 

I guess QT means QuickTime. I'm not sure what the package contains, or what it costs, or which package you need. It's not clear where you want to run a program, whether on a computer (Windows or Mac), or on your board.

I would be surprised if you can buy a program which will read your bin files and generate images onscreen based on your data. I still believe you must do that job yourself, or persuade (or pay) a C++ programmer to compose a program for you.

The job for which you need the QT library/ package/ utility, is to capture an area of the screen, and save the image in one of the standard graphics formats. It will export a series of frames as a movie file. (It has more functions too.)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top