Contrast adjustment for object detection and downfall of wrong application - image

I have a general question about contrast adjustment, forgive me if it is too naive or general and please let me know if any correction is necessary.
Here is my question: When do we usually do contrast adjustment or contrast stretching in image processing or computer vision? In particular, when is it necessary to do contrast adjustments for object detection or segmentation? What are the downfall of contrast stretching, if not applied in the right situation? Can you give me a few examples as well?
Your answers are greatly appreciated!I

In general, you can classify algorithms that are related to images and videos processing int two categories:
Image + video processing
Where these algorithms can be used to enhance the quality of the image.
Computer vision:
These algorithms can be used to detect, recognize and classify objects.
The contrast adjustment techniques used to enhance the quality and the visibility of the image.
Most of the time better input quality for computer vision algorithms can lead to better results. This is why most of cv algorithms use pre-processing steps to remove noise and improve the quality.

Related

Criteria for image processing algorithm

What criteria can be used to measure an image filtering algorithm?
I’m writing a paper related convolutional image processing, and I’m lacking criteria that can be used to measure an analyse my results. I’ve thought of it’s influence on image quality however I cannot seem to find any convincing equations or criteria for stuff like noise pollution or distortion etc.
Literally any help is much appreciated as I’m running low on time.
Image quality is a large field and can be somewhat nebulous because an improvement in one metric can directly cause a degradation in another metric. Like Nico S. commented, quality measurement is based on the application. A human user may care much more about accurate color than sharpness, while a machine vision algorithm may need minimal noise over accurate color.
Here is a great resource on image noise measurements and equations.
Here are some sharpness measurement techniques.
Here is a link to distortion measurement methods.
Don't just use the methods without reason though, figure out what is important to your application and why, then explain how your algorithm improves image quality in the specific areas that are important. Since you're working on filters, an example closer to your application might be how a Gaussian filter decreases noise. You can measure noise of an image before and after applying your filter. The tradeoff of a Gaussian filter is you lose sharpness since a Gaussian filter blurs your image. If the point of the paper is purely to provide analysis, you can present both quality metrics to show that it improves what you want it to improve, but it takes away quality from another area.
Here is one more link to other image quality factors you can explore. Good luck.

How to improve HOG objector detector for images under different illuminations?

I have some pedestrian images under different illuminations and some of them are very dark and hard to detect. So I am trying to find a way to pre-process these images to improve detection rate. So far I am thinking of:
1) color correction algorithm, such as http://www.ipol.im/pub/art/2011/llmps-scb/ or http://www.ipol.im/pub/art/2011/gl_lcc/
2) OpenCV's CLAHE
But HOG features are 'gradients', kind of 'relative differences'. So are these methods really helpful to improve detection rate when using HOG as features?
Any advices are appreciated!
From my experience with object detection, the kind of problem you describe becomes less of concern when you use the right normalization of the HoG descriptor.
I don't know which implementation you are using, so I cannot tell which normalization is used.
If you compute HoG cells for your detection window and normalize the entire descriptor globally (e.g. L2 norm), then you will suffer from illumination variation as you describe, because the areas of the object with large contrast will dominate the areas with low contrast.
If instead you normalize each block of cells as suggested by Dalal-Triggs and also by Felzenszwalb et al, then you get local contrast normalization, meaning that a pedestrians half in shadow and half in light will still 'look' like a pedestrian in HoG eyes, every block dominated by the stronger gradients (the silhouette).
If this does not help, you may want to use more modern rigid body detectors, which utilize additional feature channels (e.g. color, texture). They combine HoG with these channels, and use the cascade paradigm to pick the features best suited to your dataset. A good example of this approach is the work of Benenson et al.

image registration(non-rigid \ nonlinear)

I'm looking for some algorithm (preferably if source code available)
for image registration.
Image deformation can't been described by homography matrix(because I think that distortion not symmetrical and not
homogeneous),more specifically deformations are like barrel/distortion and trapezoid distortion, maybe some rotation of image.
I want to obtain pairs of pixel of two images and so i can obtain representation of "deformation field".
I google a lot and find out that there are some algorithm base on some phisics ideas, but it seems that they can converge
to local maxima, but not global.
I can affort program to be semi-automatic, it means some simple user interation.
maybe some algorithms like SIFT will be appropriate?
but I think it can't provide "deformation field" with regular sufficient density.
if it important there is no scale changes.
example of complicated field
http://www.math.ucla.edu/~yanovsky/Research/ImageRegistration/2DMRI/2DMRI_lambda400_grid_only1.png
What you are looking for is "optical flow". Searching for these terms will yield you numerous results.
In OpenCV, there is a function called calcOpticalFlowFarneback() (in the video module) that does what you want.
The C API does still have an implementation of the classic paper by Horn & Schunck (1981) called "Determining optical flow".
You can also have a look at this work I've done, along with some code (but be careful, there are still some mysterious bugs in the opencl memory code. I will release a corrected version later this year.): http://lts2www.epfl.ch/people/dangelo/opticalflow
Besides OpenCV's optical flow (and mine ;-), you can have a look at ITK on itk.org for complete image registration chains (mostly aimed at medical imaging).
There's also a lot of optical flow code (matlab, C/C++...) that can be found thanks to google, for example cs.brown.edu/~dqsun/research/software.html, gpu4vision, etc
-- EDIT : about optical flow --
Optical flow is divided in two families of algorithms : the dense ones, and the others.
Dense algorithms give one motion vector per pixel, non-dense ones one vector per tracked feature.
Examples of the dense family include Horn-Schunck and Farneback (to stay with opencv), and more generally any algorithm that will minimize some cost function over the whole images (the various TV-L1 flows, etc).
An example for the non-dense family is the KLT, which is called Lucas-Kanade in opencv.
In the dense family, since the motion for each pixel is almost free, it can deal with scale changes. Keep in mind however that these algorithms can fail in the case of large motions / scales changes because they usually rely on linearizations (Taylor expansions of the motion and image changes). Furthermore, in the variational approach, each pixel contributes to the overall result. Hence, parts that are invisible in one image are likely to deviate the algorithm from the actual solution.
Anyway, techniques such as coarse-to-fine implementations are employed to bypass these limits, and these problems have usually only a small impact. Brutal illumination changes, or large occluded / unoccluded areas can also be explicitly dealt with by some algorithms, see for example this paper that computes a sparse image of "innovation" alongside the optical flow field.
i found some software medical specific, but it's complicate and it's not work with simple image formats, but seems that it do that I need.
http://www.csd.uoc.gr/~komod/FastPD/index.html
Drop - Deformable Registration using Discrete Optimization

Perceptual quality measures for images

I'm currently working on algorithm for denoising images. I need to compare my algorithm with other, existing algorithms, but to do so I need a good quality measure.
The main goal for such measure is to be close to human perception skills. I know, that it is almost impossible, but there are good perceptual measures for audio signals. Are there any similar algorithms for images?
Right now I'm using simple measures, such as mean squared error (MSE), signal to noise ratio (SNR) etc...
And for your information, I'm currently implementing this in matlab
Have you check out SSIM (http://en.wikipedia.org/wiki/Structural_similarity) ? The following page (http://www.ece.uwaterloo.ca/~z70wang/research/ssim/) gives you a real example on how SSIM works compared to MSE.

What are the algorithms used behind filters in image editing softwares?

For example: What algorithm is used to generate the image by the fresco filter in Adobe Photoshop?
Do you know some place where I can read about the algorithms implemented in these filters?
Lode's Computer Graphics Tutorial
The source code for GIMP would be a good place to start. If the code for some filter doesn't make sense, at least you'll find jargon in the code and comments that can be googled.
The Photoshop algorithms can get very complex, and beyond simple blurring and sharpening, each one is a topic unto itself.
For the fresco filter, you might want to start with an SO question on how to cartoon-ify and image.
I'd love to read a collection of the more interesting algorithms, but I don't know of such a compilation.
Digital image processing is the use of computer algorithms to perform image processing on digital images. As a subcategory or field of digital signal processing, digital image processing has many advantages over analog image processing. It allows a much wider range of algorithms to be applied to the input data and can avoid problems such as the build-up of noise and signal distortion during processing. Since images are defined over two dimensions (perhaps more) digital image processing may be modeled in the form of multidimensional systems.
Digital image processing allows the use of much more complex algorithms, and hence, can offer both more sophisticated performance at simple tasks, and the implementation of methods which would be impossible by analog means.
In particular, digital image processing is the only practical technology for:
Classification
Feature extraction
Pattern recognition
Projection
Multi-scale signal analysis
Some techniques which are used in digital image processing include:
Pixelation,
Linear filtering,
Principal components analysis
Independent component analysis
Hidden Markov models
Anisotropic diffusion
Partial differential equations
Self-organizing maps
Neural networks
Wavelets

Resources