Jump to content

Importing raw 32 bit floating point image


Recommended Posts

Hi,

I'm new to both houdini and HDK. Curretnly I'm trying to import some raw image into the houdini.

There are no headers in those raw images and each pixel is a 4 byte floating point value. I've tried both

plugin way just like what IMG_SAMPLE does and FBio table way but both of them failed. Neither the structure of plugin

nor the structure of image loading program used in FBio table was well explained or companied with a good sample.

I'm kind stucked, so can someone please help me with it in ways like explaining it in a little bit more detail or informing me

any already existing plugin or tools I can use.

 

Thx a lot!

Cheers!

Link to comment
Share on other sites

When it's just some images you could try python in the compositing network. I think it should be farly simple when there is no meta data it the binary form in the image file. 

Maybe this can help: https://stackoverflow.com/questions/33483846/how-to-convert-32-bit-binary-to-float

Edited by Mandrake0
  • Like 1
Link to comment
Share on other sites

Thanks Mandrake! I have successfuly built up an executable program which converts my 32 bit raw image into 16 bit grayscale tif image.

Now I need to know how to insert it into Houdini. I believe FBio table is the tool I should use. However I don't know the exact format the command should be.

I've tried  

.r32  "cp %s /tmp/$$.tif ; icp /tmp/$$.tif stdout ; rm -f /tmp/$$.tif" ""

which is based on commands already in the FBio table for other formats. But it leads to a crash.

p.s.

My prgram now accept two file names and load the 32 bit raw image in file 1 and save it into 16 bit tiff file 2.

 

Link to comment
Share on other sites

when you have got a working tif file with your external converter program you can use it on any place where you need it.

does the MPlayer can read the file?

under the cop2 Network you can try to use a file node for reading the file.

 

i never used the FBio but it looks like it's just some Shell commands that are used. instead of icp it needs to be your commandline executable that outputs the file everything else looks fine.

 

the other rood would be to use a custom python node that reads the file but that would be not the fastest way. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...