0

I am trying to reverse engineer an image file generated by my microscope. It is supposed to be an HDR image. The file has very distinct pattern in HEX editor but I am unable to recognise it: enter image description here

First 16 bytes are some sort of a header and then every 4th byte is 0x3C, and sometimes it is 0x3D instead. The file continues with the same pattern until the end and ends with 0x3C as well. Is this something very proprietary or do any of you guys recognise it?

  • 2
    Do you have any software that is able to open this file? – morsisko Jul 30 at 11:50
  • 1
    Those are 4-byte floating point numbers -- small ones, I guess. Is that something you could expect? Post a link to a complete file, so we can take a look. – usr2564301 Jul 30 at 13:12
  • Is the image resolution 2048x1536 by any chance ? – Ian Cook Jul 30 at 16:03
  • 1
    is there a viewer for the images? – Igor Skochinsky Jul 31 at 20:31
  • 1
    I'd try to interpret is as a raw image by pixels and assume that there is no compression or image transformation here. The header should include width and height. What is then size of the whole file ? Can you upload an example ? – w s Aug 1 at 15:00
4

Without more information, as suggesting by the various comments, it's hard to be completely sure but, based on the information available, the format seems to be a very simple uncompressed vendor-specific 'raw' format with no specific identification or 'magic' numbers or tagged structure.

What follows is my best guess as to the format. Having a full file and a picture of the image it is thought to contain would confirm specific details either way.

The header appears to have the following format -

00000000: 00008000    // width of image (W) = 2048 pixels
00000004: 00006000    // height of image (H) = 1536 pixels
00000008: 0000000C    // number of bytes per pixel (B) = 12 bytes
0000000C: 00006000    // number of bytes per row (T) = W * B, probably rounded up to multiple of 8 or 16 

The suggested size of 2048x1536 does appear consistent with specifications from several digitail/usb microscopes that are available online.

The pixel data then follows for each row, with each pixel appearing to be stored as 3x 32-bit IEEE floating-point value (i.e. B = 12 bytes.) These three values being, presumably, R, G & B components in some order.

// 1st row
00000010: 3C8B50D4 3C8F6AF0 3C8974E5    // 1st pixel = 0.017006, 0.017507, 0.016779
0000001C: ....

Subsequent rows will appear T bytes beyond the previous row.

// 2nd row (at 0x00000010 + 0x00006000)
00006010: ....

// 3rd row (at 0x00000010 + 0x00006000 x 2)
0000C010: ....

// 4th row (at 0x00000010 + 0x00006000 x 3)
00012010: ....

etc...

If correct, this would suggest your original file is relatively large at around 36MB.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.