antmicro / raviewer

Raw image/video data analyzer
https://antmicro.github.io/raviewer/
Apache License 2.0
43 stars 2 forks source link

incorrect width and height detected #6

Closed Mezzano closed 1 year ago

Mezzano commented 1 year ago

Hi antmicro,

I tried raviewer on a raw image I retrieved from my sensor. Images from my sensor have 4112x3008 dimensions. When opened by raviewer, dimensions 800x15462 are set and I can't manage to set them correctly (only by using +/- which would take too much time). Could you try my sample? https://filetransfer.io/data-package/SulcwLGn

tgorochowik commented 1 year ago

Hi

thank you for the report.

For some reason we are limiting the width to 4000, that definitely needs to be updated to supported larger widths.

Note, that the upper field in raviewer is the width (that's for convenience as if you capture multiple frames to the same file you can just specify the width and the height will be automatically calculated, if there are multiple frames it will be just bigger).

So in your case you need to input 3008 which is accepted properly.

Also please note that the file you provided is a pgm file, not a raw file (i.e you would need to strip the header, raviewer will treat the PGM header as part of the image) - looking at your file it looks as though it's mostly the same shade of gray (and some black) anyway, so please make sure you captured the data correctly:

$ hexdump -C test.pgm | head -n 100
00000000  50 35 0a 34 31 31 32 20  33 30 30 38 0a 32 35 35  |P5.4112 3008.255|
00000010  0a 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
00000020  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00000100  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 e8  |................|
00000110  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00001020  81 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00001030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001110  00 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
00001120  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00001200  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 e8  |................|
00001210  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00002120  81 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00002130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00002210  00 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
00002220  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00002300  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 e8  |................|
00002310  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00003220  81 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00003230  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00003310  00 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
00003320  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00003400  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 e8  |................|
00003410  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00004320  81 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00004330  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00004410  00 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
00004420  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00004500  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 e8  |................|
00004510  81 81 81 81 81 81 81 81  81 81 81 81 81 81 81 81  |................|
*
00005420  81 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00005430  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
Mezzano commented 1 year ago

Hi @tgorochowik

Thank you for your quick answer. It works as you say, thank you.

It is indeed a pgm file and a broken frame that I need to fix.

Kind regards,

Tanguy