How to obtain Bayer RAW image for a scene

17 views
Skip to first unread message

Aleksandar Babic

unread,
Apr 28, 2021, 8:21:46 AM4/28/21
to pbrt
Hi,

Is there a way to output scene rendering as Bayer RAW image (e.g following BGGR pattern)?

Many thanks
Aleksandar

Matt Pharr

unread,
May 6, 2021, 10:05:27 AM5/6/21
to pbrt
There is no built-in support for that. You would need to modify the Film implementation so that instead of storing XYZ at each pixel it instead stored four floats for BGGR. Then, in AddSample(), you could use the fractional components of the pFilm position to determine which Bayer pixel the sample landed in and then store just the corresponding R/G/B component there. (And then you'd need to write that out in whatever format was useful to you...)

Thanks,
Matt


--
You received this message because you are subscribed to the Google Groups "pbrt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pbrt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pbrt/b068789a-d185-4fbb-8ad1-4590287b45b6n%40googlegroups.com.

Aleksandar Babic

unread,
May 7, 2021, 12:44:17 AM5/7/21
to pb...@googlegroups.com
This seems like good approach.

Many thanks Matt.

You received this message because you are subscribed to a topic in the Google Groups "pbrt" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pbrt/9or1jroXmrA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pbrt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pbrt/CAO4dBWRqyUadDr_dv2ZzThzJAJrGmAK9Js8OTjx-3oWgqNTyrQ%40mail.gmail.com.


--
Aleksandar Babic, Ph.D.
Mob: +47 40629763
Senior Machine Learning Engineer, Zivid, Norway

Reply all
Reply to author
Forward
0 new messages