mattrussmill/qcvTouchUp

Slow Performance on Large Images (duh)

Closed this issue · 4 comments

There should be an image preview available so there is not a huge performance hit when operating on large images. This should be based on the screen resolution and toggle-able. Also an OpenCL version should be included in the settings. This can be implemented by handing off memory buffers and killing one worker while starting another. This way the program should not need restarted. Histogram should also be calculated via thread-pool? Or use OpenCV's histo calculation instead? Also include OpenCL version if enabled.

Have ValueChanged (or slider released) on slider change a a preview, or downsampled image (potentially in another thread) for the histogram calculation since it is an expensive computation.

Consider using a cropped portion of the sample image as a background in the "live" histogram. This would have to exist in a 3rd thread, and would probably be a good idea to raise its priority level.

(also clean up histogramwidget class, its garbage)

Change histogram to use opencv and to not do in postImageOperationMutex()? Or to be launched from there in another thread for large images? (or with an option to have it disabled or enabled per thread which could be useful with the preview image)

EDIT: Remove Histogram from worker alltogether or move it so that it is its own functionality within the worker thread that can be enabled and disabled. It should also be stored in the worker and address passed outside as a const for use by display widgets. This means have separate subclass histogram that is used by the histogram widget and worker thread. Histogram widget also needs to be updated to be allowed to set an image as the background for a preview.

OpenCL UMat has been incorporated successfully into AdjustWorker. This will be incorporated into every adjacent image menu accordingly using AdjustWorker as a reference.