timothybrooks / hdr-plus

HDR+ Implementation
MIT License
594 stars 201 forks source link

Picture width and height #30

Closed Titaniumtown closed 5 years ago

Titaniumtown commented 5 years ago

Does anyone know of a way to remove the height and width limitations? Any pointers? Is is possible to modify the code so you can merge multiple images that are different resolutions? I know that Timothy Brooks said it would be possible https://github.com/timothybrooks/hdr-plus/issues/10#issuecomment-386712854 But how would one implement this?

timothybrooks commented 5 years ago

Could you clarify what the intended behavior you would like for the pipeline to have? It should be able to support inputs of any size by reading the width and height directly from the image. Since the pipeline is a burst processing pipeline, I would argue that it should be a requirement for all frames within a given burst to be the same size. There would ideally be explicit checks to ensure all frames are the same size and raise an error otherwise.

If you wand support for running a burst of images that are different resolutions, I would recommend writing a preprocessing function that can convert a set of images into one where all images have the same size, by cropping to the smallest of each dimension, and using this before calling the main processing function.

Titaniumtown commented 5 years ago

The intended behavior is that it would automatically find the resolution of the image without the need for the user having to edit the code and recompile just to import from a different camera.

Regarding the prospect of the code using different resolution images, I was thinking that cropped images could be used as input, without the need to crop it to a specific resolution. For example pictures of the Moon where there is no reason to process the sky and you could just crop out the moon.

Also thanks for your response!

Titaniumtown commented 5 years ago

I will try to work on this with the pointers your provided above!