Professional Documents
Culture Documents
Acquisition Image
Acquisition Image
1- Introduction
The basic data structure in MATLAB is the array, an ordered set of real or
complex elements. This object is naturally suited to the representation of
images, real-valued, ordered sets of color or intensity data. MATLAB stores
most images as two-dimensional arrays (i.e., matrices), in which each
element of the matrix corresponds to a single pixel in the displayed image.
(Pixel is derived from picture element and usually denotes a single dot on a
computer display.) For example, an image composed of 200 rows and 300
columns of different colored dots would be stored in MATLAB as a 200-by-
300 matrix. Some images, such as RGB, require a three-dimensional array,
where the first plane in the third dimension represents the red pixel
intensities, the second plane represents the green pixel intensities, and the
third plane represents the blue pixel intensities. This convention makes
working with images in MATLAB similar to working with any other type of
matrix data, and makes the full power of MATLAB available for image
processing applications.
Process1
Main Process
Process2 Process3
Send Image frames
Acquire Image Process Image
Process4
Display Image
3- Application Code
parpool('local',4);
D = parallel.pool.DataQueue;
fig = figure('Visible','on');
afterEach(D,@processDisp);
freq = 5;
f = parfeval(@getFrameFromCamera,0,D,freq);
pause(30);
cancel(f);
function getFrameFromCamera(D,freq)
cam = webcam;
while true
img = snapshot(cam);
send(D,img);
pause(1/freq);
end
end
______________Low-Light Image
Enhancement________________
function processDisp1(img)
A = img;
AInv = imcomplement(A);
BInv = imreducehaze(AInv);
B = imcomplement(BInv);
BInv = imreducehaze(AInv,
'Method','approx','ContrastEnhancement','boost');
BImp = imcomplement(BInv);
imshow([img, BImp],'Parent',gca);
end
4- Further work
For enhance the output image, use one type of methods
histogram, filters, equalization ... this can be as future work.
5- Conclusion
In conclusion, MATLAB is a useful tool for prototyping, developing and
testing image processing algorithms and pipelines. It provides the user
with the option of either using the functions of the IPT or leveraging the
capabilities of a high-level programming language combined with many
built-in standard functions to create their own algorithms.
6- Reference
[1] RT Tan, Visibility in bad weather from a single image, in Proceedings of IEEE Computer Society
Conference on Computer Vision and Pattern Recognition (CVPR, Anchorage, 2008).
[2] R Fattal, Single image dehazing. ACM Trans. Graph. 72(3), 72:1-72:9 (2008).
[3] K He, J Sun, X Tang, Proceedings of IEEE Computer Society Conference on Computer Vision and
Pattern Recognition (CVPR, Miami, 2009), pp. 1956–1963.
[4] T Yu, I Riaz, J Piao, H Shin, Real-time single image dehazing using block-topixel interpolation and
adaptive dark channel prior. IET Image Process. 9(9), 725–734 (2015).