So in this example, you have 4 640x480 images that represent non-overlapping 
regions that, between them all, exactly cover all pixels. Either add or over 
ought to work in this case.

I'm not sure I understand the case where neither add nor over will work. Are 
you combining images that contain areas that *do* overlap?

Are the "valid" regions for each image always rectangular? And do you know what 
they are?

Since OpenEXR is a format that has good support for separate "data" and 
"display" windows, is it possible to generate these images so that each "slice" 
correctly has the data window restricted (and set correctly) for just the 
regions that they represent? As an example, slice3.exr might have data window 
(0,0)-(319,239) and then accurate reflect the portion of the overall image that 
it defines; whereas currently it is (0,0)-(639,479) and simply has black pixels 
in the (presumed?) uncovered regions -- but of course there's nothing in the 
image that unambiguously distinguishes an "included but black" pixel from an 
"unincluded" pixel, if you catch my drift.

If each image only contained the pixels it's meant to define (with a properly 
sized and offset "data window" in the header), then once again "add" would work 
perfectly.

I think the right answer is going to depend on knowing for sure:

(a) will each image define a contiguous rectangular section.

(b) are the separate images potentially overlapping (that is, may a given (x,y) 
pixel end up "defined" in more than one image that you wish to combine?)

(c) can you get the program generating these images to output correct data and 
display windows?


On Jun 19, 2014, at 7:16 PM, Fredrik Averpil <[email protected]> wrote:

> Hi Larry,
> 
> I did try the ImageBufAlgo.over() but I believe I need to specify a region 
> (roi) to make it work, as the EXR background/canvas is not always black for 
> the slices I'm trying to merge (or composit together). Please see these 
> example slices: 
> https://www.dropbox.com/sh/9if7mm2plvyffum/AAAu1kmGml24q-ZD9r4ovzJMa/email/oiio_ImageBufAlgo
> 
> My problem is the number of slices and their size can vary, so I was hoping I 
> could somehow detect the roi / region and then specify that in 
> ImageBufAlgo.over(). Perhaps that should have been my initial question.
> Is that possible, and if so how can the roi be detected for the attached 
> slice#.exr files?
> 
> The result.exr in the Dropbox link is what I would like to end up with.
> 
> 
> 
> // Fredrik
> 
>  
> 
> 
> On Fri, Jun 20, 2014 at 12:23 AM, Larry Gritz <[email protected]> wrote:
> There is an ImageBufALgo.over(). Would that solve your problem?
> 
> I'm not 100% sure I understand what you mean by "merging". Do you mean 
> "compositing?" Or are you implying that you are taking two incomplete renders 
> and trying to combine the pixels or tiles rendered in one with a disjoint set 
> from the other render?
> 
> 
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]



_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to