LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does my application save the raw data to binary file?

Hi all,

 

At first, please look at my attachment. There is the part of my code (it is inside of a while loop) which saves a raw data from my firewire camera. I am thinking how does this saving process work? How does it save the data in each while loop's iteration time (pixels, rows and columns)? For example if I use 100x1000 8-bit image. There is also Set File Position.vi which makes next line after iteration (at least I think so?). It is important to know when I'm processing the data later with Matlab.

 

My second question:

If I set height = 100 and width = 1000 as parameters, image indicator from IMAQdx Grab's image out says that the image is "only" 1000x96 8-bit image. Where are "missing" 4 bits?

 

B R,

Jick

0 Kudos
Message 1 of 11
(2,981 Views)

Heyy, maybe someone would know an answer to this question? 🙂

 

Jick

 

 

0 Kudos
Message 2 of 11
(2,954 Views)

Hi Jick,

 

what is given in your "image size" (num of bytes) indicator?

Setting file position to end is ok for appending data to a file, writing binary files is just taking the byte stream given by that IMAQ function ( I don't have IMAQ installed, so cannot check what's coming out there).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 11
(2,950 Views)
If you are asking about my second question, I noticed that height from IMAQdx Grab.vi's session out is still same as I sent (100) but the image indicator from image out says that I have 1000x96 8-bit image. Why it is not 1000x100 8-bit image? Smiley Surprised
0 Kudos
Message 4 of 11
(2,943 Views)

Hi Jick,

 

that doesn't answer my question... What is given in the "image data size (bytes)" indicator?

 

I don't have IMAQ installed nor worked with, so I can't answer on IMAQ specific issues...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 11
(2,938 Views)
Sorry, my bad. Image data size (bytes) gives 96064.
0 Kudos
Message 6 of 11
(2,932 Views)

Hi Jick,

 

that perfectly fits your observation: 96*1000*1byte+64byte header(?). Smiley Wink

So you only get 1000*96 pixels from IMAQ...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 11
(2,927 Views)

Yes, I know that I get only 96*1000*1byte+64byte header. But my question is why I get it instead of getting 100*1000*1byte+header=100064  as set in the beginning (in front panels parameters control)? It kind of eats 4 of them?

 

B R,

Jick

0 Kudos
Message 8 of 11
(2,919 Views)

Hi Jick,

 

well, as said before I don't have IMAQ...

 

Maybe you should attach either the vi or a picture showing the (full) IMAQ part instead of the file saving, which works perfectly Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 11
(2,916 Views)

Hi again,

 

Here is my whole CameraSoftware. It is a part of the bigger measurement program.

I hope you can find the solution of "lost 4 bits" 🙂

 

 

B R,

Jick

Download All
0 Kudos
Message 10 of 11
(2,886 Views)