Stefan, it feels like you've crammed a whole summer project into your 
qualifying patch.  :-)

The collection of your ip_foo functions are a great list of new and helpful 
image processing functionality to add to ImageBufAlgo and oiiotool.  But none 
of them are in the right places, with the right style, or sufficiently general. 
 By which I mean... some look like they will work on float only, some seem to 
assume a single channel or a 3-channel image, often they seem to assume a 
0.0-1.0 range of pixel values, operate only on the whole image and with a 
single thread, and so on.

I think a great summer project proposal would be to take this list of 
functionality -- for which you've demonstrated that you understand the math of 
the guts -- and carefully implement them one by one in a totally industrial 
strength, bulletproof fashion:

1. Operating on images with an arbitrary number of channels (specifying a 
single channel or all channels as a parameter), except in the rare case where 
it's clearly non-sensical to do so.
2. Operating on any of our data types.
3. Taking a pixel begin/end range so it can operate on a region of interest 
and/or be easily broken up into tiles for parallel execution.
4. Working in 3D as well, where it makes sense (i.e. zbegin/end in addition to 
x and y).
5. Working with arbitrary pixel data values, not assuming values are always on 
[0,1] (i.e., HDR imagery) except for operations where that clearly makes no 
sense.
6. Robustly dealing with images of different sizes and/or not overlapping 
exactly.
7. Taking a 'threads' parameter, which: if 1 just computes in the thread that 
called the function; if > 1 will split the image (if large enough) into n 
strips or tiles and spawn threads which each call itself recursively with 
threads=1 to dole out subsections of the image for parallel work, and for 
threads=0 uses the OpenImageIO global 'threads' variable to determine how many 
threads to use.

This sounds worse than it actually is.  I think you'll find that after we work 
out the methodology for the first one or two, all the others will follow the 
same general pattern fairly closely, and the results will be a really solid set 
of functionality.

If you wanted to do this project, I would consider what you have already shown 
us as a qualifying patch, even though I won't want to commit anything until 
it's all in this kind of final state.  You've clearly already demonstrated a 
pretty good understanding of how to patch oiiotool and implement functions that 
work on ImageBuf's.

        -- lg


On Mar 28, 2012, at 8:30 PM, Stefan Stavrev wrote:

> I have added command line functionality for the algorithms and
> documented their usage. Test images are also provided, so enjoy
> testing and let me know if there are some problems.
> 
> https://github.com/StefanStavrev/oiio/commit/f2f5d7ded925f2ac5fecc3f6190939db18dc8b1e
> 
> Looking forward to hear from you.
> 
> Stefan
> 
> On 3/25/12, Stefan Stavrev <[email protected]> wrote:
>> Hello Robert,
>> 
>> I pulled a request. I haven't added command line functionality for the
>> algorithms yet. For now, the only way to test them is:
>> 
>> 1. Extract this archive(the same from previous message) to some location.
>> http://www.mediafire.com/?nefag5h5w7e1o74
>> 
>> 2. Change the variable "path" on line 1497 in oiiotool.cpp, to the
>> location you extracted.
>> 
>> 3. Replace your oiiotool.cpp with the one from the archive.
>> 
>> 4. In the archive you will find folder "ip", and in it folders for
>> each group of algorithms such as corners, edges, etc. In each there is
>> tests folder. In there you will find code for each algorithm, that you
>> need to copy to oiiotool.cpp in order to test the algorithm. Basically
>> you just replace the code in main in oiiotool.cpp.
>> 
>> Stefan
>> 
>> On 3/25/12, Robert Matusewicz <[email protected]> wrote:
>>> Hi,
>>> 
>>> Could You prepare a pull request from Your changes? It would be easier
>>> for us to review it
>>> 
>>> Cheers
>>> Robert
>>> 
>>> W dniu 25 marca 2012 00:46 użytkownik Stefan Stavrev
>>> <[email protected]> napisał:
>>>> Hello
>>>> 
>>>> The last two days I implemented and tested Canny edge detector and
>>>> Harris corner detector:
>>>> 
>>>> Canny edge detector:
>>>> http://postimage.org/image/gt04nokff/
>>>> http://postimage.org/image/we8hpungl/
>>>> 
>>>> Harris corner detector:
>>>> http://postimage.org/image/m7nhnpvq7/
>>>> 
>>>> I send you just one file, my code is from line 1497 to the end in
>>>> oiiotool.cpp, you can download code, test images and test files here:
>>>> http://www.mediafire.com/?nefag5h5w7e1o74
>>>> 
>>>> I will wait for comments here before I submit to github. But anyways I
>>>> would like to implement command line functionality for all these
>>>> algorithms before I submit.
>>>> 
>>>> Summary of what I have implemented so far:
>>>> 
>>>> 1. Histograms
>>>>    - histograms for 8-bit and 16-bit grayscale images
>>>>    - luminance histograms and per channel histograms for rgb images
>>>>    - cumulative histograms
>>>> 2. Point operations for 8-bit grayscale images
>>>>    - contrast, brightness, invert, threshold
>>>>    - auto-contrast and modified auto-contrast (better handles extreme
>>>> values)
>>>>    - histogram equalization
>>>>    - two different methods for histogram specification(matching one
>>>> image to another)
>>>>    - gamma correction
>>>>    - alpha blending
>>>> 3. Filters
>>>>    - box filter
>>>>    - general linear filter of arbitrary size
>>>>    - min and max non-linear filters
>>>>    - median filter
>>>> 4. Edges
>>>>    - sobel and prewitt edge detectors
>>>>    - canny edge detector
>>>>    - laplace sharpening
>>>>    - unsharp mask
>>>> 5. Corners
>>>>    - harris corner detector
>>>> 
>>>> I will implement more algorithms these days and then I will work on
>>>> allowing the user to call them from command line. In the end,
>>>> hopefully Tuesday or Wednesday night, I will make one pdf where I will
>>>> show the use of all these algorithms to make it easy for you guys to
>>>> see what I have done. So far I have 1200 lines of code.
>>>> 
>>>> Thank you for any feedback, it means a lot.
>>>> 
>>>> Stefan
>>>> _______________________________________________
>>>> Oiio-dev mailing list
>>>> [email protected]
>>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>>> 
>>> 
>>> 
>>> --
>>> My public key can be found at https://keyserver2.pgp.com
>>> _______________________________________________
>>> Oiio-dev mailing list
>>> [email protected]
>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>>> 
>> 
> _______________________________________________
> 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