@Namespace(value="cv::bioinspired") @Properties(inherit=opencv_bioinspired.class) public class RetinaFastToneMapping extends Algorithm
/** \brief a wrapper class which allows the tone mapping algorithm of Meylan&al(2007) to be used with OpenCV.
This algorithm is already implemented in thre Retina class (retina::applyFastToneMapping) but used it does not require all the retina model to be allocated. This allows a light memory use for low memory devices (smartphones, etc. As a summary, these are the model properties: - 2 stages of local luminance adaptation with a different local neighborhood for each. - first stage models the retina photorecetors local luminance adaptation - second stage models th ganglion cells local information adaptation - compared to the initial publication, this class uses spatio-temporal low pass filters instead of spatial only filters. this can help noise robustness and temporal stability for video sequence use cases.
for more information, read to the following papers : Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816Benoit A., Caplier A., Durette B., Herault, J., "USING HUMAN VISUAL SYSTEM MODELING FOR BIO-INSPIRED LOW LEVEL IMAGE PROCESSING", Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773, DOI: http://dx.doi.org/10.1016/j.cviu.2010.01.011 regarding spatio-temporal filter and the bigger retina model : Vision: Images, Signals and Neural Networks: Models of Neural Processing in Visual Perception (Progress in Neural Processing),By: Jeanny Herault, ISBN: 9814273686. WAPI (Tower ID): 113266891.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
RetinaFastToneMapping(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
applyFastToneMapping(GpuMat inputImage,
GpuMat outputToneMappedImage) |
void |
applyFastToneMapping(Mat inputImage,
Mat outputToneMappedImage)
\brief applies a luminance correction (initially High Dynamic Range (HDR) tone mapping)
|
void |
applyFastToneMapping(UMat inputImage,
UMat outputToneMappedImage) |
static RetinaFastToneMapping |
create(Size inputSize) |
void |
setup() |
void |
setup(float photoreceptorsNeighborhoodRadius,
float ganglioncellsNeighborhoodRadius,
float meanLuminanceModulatorK)
\brief updates tone mapping behaviors by adjusing the local luminance computation area
|
clear, empty, getDefaultName, position, read, save, save, write, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public RetinaFastToneMapping(Pointer p)
Pointer.Pointer(Pointer)
.public void applyFastToneMapping(@ByVal Mat inputImage, @ByVal Mat outputToneMappedImage)
using only the 2 local adaptation stages of the retina parvocellular channel : photoreceptors level and ganlion cells level. Spatio temporal filtering is applied but limited to temporal smoothing and eventually high frequencies attenuation. This is a lighter method than the one available using the regular retina::run method. It is then faster but it does not include complete temporal filtering nor retina spectral whitening. Then, it can have a more limited effect on images with a very high dynamic range. This is an adptation of the original still image HDR tone mapping algorithm of David Alleyson, Sabine Susstruck and Laurence Meylan's work, please cite: -> Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816
inputImage
- the input image to process RGB or gray levelsoutputToneMappedImage
- the output tone mapped imagepublic void applyFastToneMapping(@ByVal UMat inputImage, @ByVal UMat outputToneMappedImage)
public void applyFastToneMapping(@ByVal GpuMat inputImage, @ByVal GpuMat outputToneMappedImage)
public void setup(float photoreceptorsNeighborhoodRadius, float ganglioncellsNeighborhoodRadius, float meanLuminanceModulatorK)
photoreceptorsNeighborhoodRadius
- the first stage local adaptation areaganglioncellsNeighborhoodRadius
- the second stage local adaptation areameanLuminanceModulatorK
- the factor applied to modulate the meanLuminance information
(default is 1, see reference paper)public void setup()
@opencv_core.Ptr public static RetinaFastToneMapping create(@ByVal Size inputSize)
Copyright © 2020. All rights reserved.