SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
Results Review of Detecting ofHuman Errors Algorithm for image files
Author: Minh Anh Nguyen
Email: minhanhnguyen@q.com
Purpose
The purpose of this analysis is to determine if the method of comparing two image files can be
used for detecting of human errors for channel-not-loaded-correctly issue. There are many
algorithms which can be used to compare two image files. These algorithms are: edge detection,
Short Time Fourier Transform (STFT), wavelet, and histogram. In this project, histogram
algorithm is used to compare two image files.
Why use Histogram
Histogram is a way of visualizing the largest intensities of an image. It is used to depict problems
which originate during image acquisition such as exposure, contrast, dynamic range. The
contrast of a grayscale image shows how easily objects in the image can be distinguished. The
dynamic range is the number of distinct pixel value in an image. It is used to show image
statistics in an easily interpreted visual format. It is also a graph showing the number of pixels in
an image at each different intensity value found in that image. The histogram of a digital image
is a distribution of its discrete intensity levels in the range [0, L-1]. The number of possible
intensity values depends on the numerical type encoding the image.
For example, a grayscale image encoded with n=8 bits, it will has an array of size L=28=256.
The number of possible intensity values go from 0 representing black to L-1=255 representing
white. Since there are 256 different possible intensities, the histogram will graphically display
256 numbers showing the distribution of pixels amongst those greyscale values. When
represented as a plot, the x-axis is the intensity value from 0 to 255, and the y-axis is the number
of pixels with that intensity value. The y-axis varies depending on the number of the pixels in
the image and how their intensities are distributed as shown in figure 2. An image has only one
histogram, but many images may have the same histogram.
Histograms have many uses. One of the more common is to determine if the overall intensity in
the image is high enough for this inspection task. Histogram is used to determine whether an
image contains distinct regions of certain grayscale values. If the image has poor dynamic range,
then the histogram confirms what one can see by visual inspection. It provides a general
description of the appearance of an image and helps identify various components such as the
background, objects, and noise.
How Histogram Works
The operation is very simple. The image is scanned in a single pass and a running count of the
number of pixels found at each intensity value is kept. This is then used to construct a suitable
histogram. The histogram of an 8-bit image, for example can be thought of as a table with 256
entries, or ‘bins’, indexed from 0 to 255. In bin 0 we record the number of times a gray level of 0
occurs; in bin 1 we record the number of times a grey level of 1 occurs, and so on, up to bin 255.
Techniques for comparing two image files
Step1: read images
Read two grayscale images into the workspace.
Step 2: Resize images
To make the image comparison easier, resize the images to have the same width.
Step 3: Find matching features between images
Step 4: Display error message on the computer monitor screen, if images are not matched.
Flow chart for comparing two image files
Figure1. Flow chart for comparing two image files
Image test in simulation mode
The following steps are a procedure to test the image in simulation mode.
1. Make sure image files are loaded into the workspace without any issues.
2. Make sure a correct file is loaded
3. Plot histogram of the image
4. Verify that the histogram value is correct.
5. Positive test: load two image files which have 2 different images and verify that the test
results show the difference.
6. Negative test: load two image files which have 2 similar images and verify that the test
results show the same thing or match.
Software
Matlab R2015b
Labview 2014
Summary of results
The following figure illustrates the difference between the displays of the histogram of the same
image in a linear and the results of the techniques and flow chart for comparing two image files
above.
Figure2. Matlab results for comparing two images which are identical.
Figure3. Matlab results for comparing two images which are not identical. The object being
viewed is light in color and it is placed on a dark background, and so the histogram exhibits a
good bi-modal distribution. One peak represents the object pixels, other represents the
background.
Figure4. Matlab results for comparing two images which are not identical. The object being
viewed is dark in color and it is placed on a light background, and so the histogram exhibits a
good bi-modal distribution. One peak represents the object pixels, one represents the
background. The peak represents of back ground is at the highest intensity value, X = 241.
Figure5. Matlab results for comparing two hex pin images which are identical. The resulting of
histograms above showed a large spike at 250 intensity value which results in the rest of the
histogram being scaled up to 256.
Figure6. Matlab results for comparing two hex pin images which are not identical
Figure7. Labview results for comparing two image files which are identical
Figure8. Labview results for comparing two image files which are not identical
These results showed that the method of comparing two image files can be used for detecting of
human errors for channel-not-loaded-correctly issue. A histogram is the frequency distribution
of the gray levels with the number of pure black values displayed on the left and number of pure
white values on the right.
Matlab Code for comparing two image files.
%% Matlab Code:
% Author: Minh Anh Nguyen (minhanhnguyen@q.com)
%This function will perform the followign tasks:
%1. read in two ".png" file, display both images on the computer screen.
%2. histogram of the images
% 3. compare both image files.
% 4. display a message on the computer screen if both image are not the
% same.
function [imagefunction] = imagefunction( file1, file2 );
% clear all; % Erase all existing variables.
close all; % Close all figures (except those of imtool.)
clc;% Clear the command window.
imtool close all; % Close all imtool figures.
workspace; % Make sure the workspace panel is showing.
fontSize = 20;
%%%%%%%%%%%%%
% %% team: edit your file here
% %%% set the path
% folder = 'I:F2015_486Aimage';
% %reading images as array to variable 'a' & 'b'.
image1 = imread( file1 );
image2= imread( file2 );
%
% %reading images as array to variable 'a' & 'b'.
% image1 = imread('Loaded-Mid Channel.PNG');
% image2= imread('Gross Misloaded-Mid Channel.PNG');
%
% %% info
imfinfo( file1 )
imfinfo( file2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% do not edit anything below here!!!!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a = image1;
b = image2;
%% size
a1= size(a);
b1= size (b);
figure;
[rows columns numberOfColorBands] = size(a);
subplot(2, 2, 1); imshow(a, []);
title('Reference image', 'Fontsize', fontSize);
set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.
redPlane = a(:, :, 1);
greenPlane = a(:, :, 2);
bluePlane = a(:, :, 3);
[rows columns numberOfColorBands] = size(b);
subplot(2, 2, 3); imshow(b, []);
title('Image2', 'Fontsize', fontSize);
set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.
redPlane1 = b(:, :, 1);
greenPlane1 = b(:, :, 2);
bluePlane1 = b(:, :, 3);
% Let's get its histograms.
[pixelCountR grayLevelsR] = imhist(redPlane);
subplot(2, 2, 2); %plot(pixelCountR, 'r');
stem(grayLevelsR,pixelCountR, 'r');
title('Histogram of Reference image', 'Fontsize', fontSize);
xlabel('Intensity values','Fontsize', fontSize);
ylabel('Number of pixels', 'Fontsize', fontSize);
xlim([0 grayLevelsR(end)]); % Scale x axis manually.
[pixelCountR1 grayLevelsR1] = imhist(redPlane1);
subplot(2, 2, 4);
%plot(pixelCountR1, 'r');
stem(grayLevelsR1,pixelCountR1);
title('Histogram of Image2', 'Fontsize', fontSize);
xlabel('Intensity values','Fontsize', fontSize);
ylabel('Number of pixels','Fontsize', fontSize);
xlim([0 grayLevelsR1(end)]); % Scale x axis manually.
%check image for different
different = a1- b1
if different==0
disp('The images are same')%output display
else
disp('the images are not same')
msgbox('Test error. Please check your setting', 'Error')
end;
Labview Code for comparing two image files.

Weitere ähnliche Inhalte

Was ist angesagt?

A New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash FunctionA New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash FunctionIRJET Journal
 
Visual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learningVisual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learningBenjamin Bengfort
 
Images in matlab
Images in matlabImages in matlab
Images in matlabAli Alvi
 
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...IRJET Journal
 
A comparative analysis of retrieval techniques in content based image retrieval
A comparative analysis of retrieval techniques in content based image retrievalA comparative analysis of retrieval techniques in content based image retrieval
A comparative analysis of retrieval techniques in content based image retrievalcsandit
 
search engine for images
search engine for imagessearch engine for images
search engine for imagesAnjani
 
IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...
IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...
IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...IRJET Journal
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLABBasics of Image Processing using MATLAB
Basics of Image Processing using MATLABvkn13
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlabAnkur Tyagi
 
A proposed assessment metrics for image steganography
A proposed assessment metrics for image steganographyA proposed assessment metrics for image steganography
A proposed assessment metrics for image steganographyijcisjournal
 
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...IJITCA Journal
 
Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)Benjamin Bengfort
 

Was ist angesagt? (15)

A New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash FunctionA New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash Function
 
Visual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learningVisual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learning
 
Images in matlab
Images in matlabImages in matlab
Images in matlab
 
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
 
Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With Images
 
A comparative analysis of retrieval techniques in content based image retrieval
A comparative analysis of retrieval techniques in content based image retrievalA comparative analysis of retrieval techniques in content based image retrieval
A comparative analysis of retrieval techniques in content based image retrieval
 
Image Compression
Image CompressionImage Compression
Image Compression
 
search engine for images
search engine for imagessearch engine for images
search engine for images
 
IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...
IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...
IRJET- An Approach to FPGA based Implementation of Image Mosaicing using Neur...
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLABBasics of Image Processing using MATLAB
Basics of Image Processing using MATLAB
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlab
 
Rn d presentation_gurulingannk
Rn d presentation_gurulingannkRn d presentation_gurulingannk
Rn d presentation_gurulingannk
 
A proposed assessment metrics for image steganography
A proposed assessment metrics for image steganographyA proposed assessment metrics for image steganography
A proposed assessment metrics for image steganography
 
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
 
Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)
 

Ähnlich wie The method of comparing two image files

Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlabdedik dafiyanto
 
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABJim Jimenez
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging SystemVrushali Lanjewar
 
histogram equalization of grayscale and color image
histogram equalization of grayscale and color imagehistogram equalization of grayscale and color image
histogram equalization of grayscale and color imageSaeed Ullah
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) ijceronline
 
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVALA COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVALcscpconf
 
GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACH
GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACHGRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACH
GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACHJournal For Research
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabminhtaispkt
 
A Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session KeyA Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session KeySougata Das
 
IRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep LearningIRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep LearningIRJET Journal
 
Sublinear tolerant property_testing_halfplane
Sublinear tolerant property_testing_halfplaneSublinear tolerant property_testing_halfplane
Sublinear tolerant property_testing_halfplaneIgor Kleiner
 
ee8220_project_W2013_v5
ee8220_project_W2013_v5ee8220_project_W2013_v5
ee8220_project_W2013_v5Farhad Gholami
 
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...Editor IJCATR
 
Comparative between global threshold and adaptative threshold concepts in ima...
Comparative between global threshold and adaptative threshold concepts in ima...Comparative between global threshold and adaptative threshold concepts in ima...
Comparative between global threshold and adaptative threshold concepts in ima...AssiaHAMZA
 
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docxmercysuttle
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 

Ähnlich wie The method of comparing two image files (20)

Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlab
 
Matlab dip
Matlab dipMatlab dip
Matlab dip
 
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
histogram equalization of grayscale and color image
histogram equalization of grayscale and color imagehistogram equalization of grayscale and color image
histogram equalization of grayscale and color image
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVALA COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
 
Himadeep
HimadeepHimadeep
Himadeep
 
GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACH
GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACHGRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACH
GRAY SCALE IMAGE SEGMENTATION USING OTSU THRESHOLDING OPTIMAL APPROACH
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
A Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session KeyA Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session Key
 
IRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep LearningIRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep Learning
 
Sublinear tolerant property_testing_halfplane
Sublinear tolerant property_testing_halfplaneSublinear tolerant property_testing_halfplane
Sublinear tolerant property_testing_halfplane
 
ee8220_project_W2013_v5
ee8220_project_W2013_v5ee8220_project_W2013_v5
ee8220_project_W2013_v5
 
h.pdf
h.pdfh.pdf
h.pdf
 
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
 
Comparative between global threshold and adaptative threshold concepts in ima...
Comparative between global threshold and adaptative threshold concepts in ima...Comparative between global threshold and adaptative threshold concepts in ima...
Comparative between global threshold and adaptative threshold concepts in ima...
 
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 

Mehr von Minh Anh Nguyen

Chúc mừng năm mới 2018
Chúc mừng năm mới 2018Chúc mừng năm mới 2018
Chúc mừng năm mới 2018Minh Anh Nguyen
 
Chuc Mung Nam Moi 2017- Dinh Dau
Chuc Mung Nam Moi 2017- Dinh DauChuc Mung Nam Moi 2017- Dinh Dau
Chuc Mung Nam Moi 2017- Dinh DauMinh Anh Nguyen
 
Sound and Vibration Toolkit User Manual
Sound and Vibration Toolkit User ManualSound and Vibration Toolkit User Manual
Sound and Vibration Toolkit User ManualMinh Anh Nguyen
 
Tet trung thu -- Happy mid-autumn moon festival
Tet trung thu -- Happy mid-autumn moon festivalTet trung thu -- Happy mid-autumn moon festival
Tet trung thu -- Happy mid-autumn moon festivalMinh Anh Nguyen
 
An Introduction to HFSS:
An Introduction to HFSS:An Introduction to HFSS:
An Introduction to HFSS:Minh Anh Nguyen
 
STUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITS
STUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITSSTUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITS
STUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITSMinh Anh Nguyen
 
Electrocardiogram (ECG or EKG)
Electrocardiogram (ECG or EKG)Electrocardiogram (ECG or EKG)
Electrocardiogram (ECG or EKG)Minh Anh Nguyen
 
Simulation results of induction heating coil
Simulation results of induction heating coilSimulation results of induction heating coil
Simulation results of induction heating coilMinh Anh Nguyen
 
Matlab code for comparing two microphone files
Matlab code for comparing two microphone filesMatlab code for comparing two microphone files
Matlab code for comparing two microphone filesMinh Anh Nguyen
 
Results Review of iphone and Detecting of Human Errors Algorithm
Results Review of iphone and Detecting of Human Errors AlgorithmResults Review of iphone and Detecting of Human Errors Algorithm
Results Review of iphone and Detecting of Human Errors AlgorithmMinh Anh Nguyen
 
Results Review of Microphone Prototype and LabView Detecting of Human Errors ...
Results Review of Microphone Prototype and LabView Detecting of Human Errors ...Results Review of Microphone Prototype and LabView Detecting of Human Errors ...
Results Review of Microphone Prototype and LabView Detecting of Human Errors ...Minh Anh Nguyen
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio filesMinh Anh Nguyen
 
A message for my uncle on father's day
A message for my uncle on father's dayA message for my uncle on father's day
A message for my uncle on father's dayMinh Anh Nguyen
 
CENTRIFUGE LOADING HUMAN FACTORS
CENTRIFUGE LOADING HUMAN FACTORSCENTRIFUGE LOADING HUMAN FACTORS
CENTRIFUGE LOADING HUMAN FACTORSMinh Anh Nguyen
 

Mehr von Minh Anh Nguyen (20)

Chúc mừng năm mới 2018
Chúc mừng năm mới 2018Chúc mừng năm mới 2018
Chúc mừng năm mới 2018
 
Chuc Mung Nam Moi 2017- Dinh Dau
Chuc Mung Nam Moi 2017- Dinh DauChuc Mung Nam Moi 2017- Dinh Dau
Chuc Mung Nam Moi 2017- Dinh Dau
 
Happy New Year
Happy New Year Happy New Year
Happy New Year
 
Tutorial for EDA Tools
Tutorial for EDA ToolsTutorial for EDA Tools
Tutorial for EDA Tools
 
Sound and Vibration Toolkit User Manual
Sound and Vibration Toolkit User ManualSound and Vibration Toolkit User Manual
Sound and Vibration Toolkit User Manual
 
Tet trung thu -- Happy mid-autumn moon festival
Tet trung thu -- Happy mid-autumn moon festivalTet trung thu -- Happy mid-autumn moon festival
Tet trung thu -- Happy mid-autumn moon festival
 
An Introduction to HFSS:
An Introduction to HFSS:An Introduction to HFSS:
An Introduction to HFSS:
 
STUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITS
STUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITSSTUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITS
STUCK-OPEN FAULT ANALYSIS IN CMOS TRANSISTOR BASED COMBINATIONAL CIRCUITS
 
Electrocardiogram (ECG or EKG)
Electrocardiogram (ECG or EKG)Electrocardiogram (ECG or EKG)
Electrocardiogram (ECG or EKG)
 
Maxwell3 d
Maxwell3 dMaxwell3 d
Maxwell3 d
 
Simulation results of induction heating coil
Simulation results of induction heating coilSimulation results of induction heating coil
Simulation results of induction heating coil
 
Matlab code for comparing two microphone files
Matlab code for comparing two microphone filesMatlab code for comparing two microphone files
Matlab code for comparing two microphone files
 
Audio detection system
Audio detection systemAudio detection system
Audio detection system
 
Love me tender
Love me tenderLove me tender
Love me tender
 
Ni myRio and Microphone
Ni myRio and MicrophoneNi myRio and Microphone
Ni myRio and Microphone
 
Results Review of iphone and Detecting of Human Errors Algorithm
Results Review of iphone and Detecting of Human Errors AlgorithmResults Review of iphone and Detecting of Human Errors Algorithm
Results Review of iphone and Detecting of Human Errors Algorithm
 
Results Review of Microphone Prototype and LabView Detecting of Human Errors ...
Results Review of Microphone Prototype and LabView Detecting of Human Errors ...Results Review of Microphone Prototype and LabView Detecting of Human Errors ...
Results Review of Microphone Prototype and LabView Detecting of Human Errors ...
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio files
 
A message for my uncle on father's day
A message for my uncle on father's dayA message for my uncle on father's day
A message for my uncle on father's day
 
CENTRIFUGE LOADING HUMAN FACTORS
CENTRIFUGE LOADING HUMAN FACTORSCENTRIFUGE LOADING HUMAN FACTORS
CENTRIFUGE LOADING HUMAN FACTORS
 

Kürzlich hochgeladen

Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfShreyas Pandit
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...gerogepatton
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunicationnovrain7111
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organizationchnrketan
 
Forming section troubleshooting checklist for improving wire life (1).ppt
Forming section troubleshooting checklist for improving wire life (1).pptForming section troubleshooting checklist for improving wire life (1).ppt
Forming section troubleshooting checklist for improving wire life (1).pptNoman khan
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical trainingGladiatorsKasper
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProRay Yuan Liu
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 

Kürzlich hochgeladen (20)

Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdf
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunication
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organization
 
Versatile Engineering Construction Firms
Versatile Engineering Construction FirmsVersatile Engineering Construction Firms
Versatile Engineering Construction Firms
 
Forming section troubleshooting checklist for improving wire life (1).ppt
Forming section troubleshooting checklist for improving wire life (1).pptForming section troubleshooting checklist for improving wire life (1).ppt
Forming section troubleshooting checklist for improving wire life (1).ppt
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
ASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductosASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductos
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision Pro
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
 

The method of comparing two image files

  • 1. Results Review of Detecting ofHuman Errors Algorithm for image files Author: Minh Anh Nguyen Email: minhanhnguyen@q.com Purpose The purpose of this analysis is to determine if the method of comparing two image files can be used for detecting of human errors for channel-not-loaded-correctly issue. There are many algorithms which can be used to compare two image files. These algorithms are: edge detection, Short Time Fourier Transform (STFT), wavelet, and histogram. In this project, histogram algorithm is used to compare two image files. Why use Histogram Histogram is a way of visualizing the largest intensities of an image. It is used to depict problems which originate during image acquisition such as exposure, contrast, dynamic range. The contrast of a grayscale image shows how easily objects in the image can be distinguished. The dynamic range is the number of distinct pixel value in an image. It is used to show image statistics in an easily interpreted visual format. It is also a graph showing the number of pixels in an image at each different intensity value found in that image. The histogram of a digital image is a distribution of its discrete intensity levels in the range [0, L-1]. The number of possible intensity values depends on the numerical type encoding the image. For example, a grayscale image encoded with n=8 bits, it will has an array of size L=28=256. The number of possible intensity values go from 0 representing black to L-1=255 representing white. Since there are 256 different possible intensities, the histogram will graphically display 256 numbers showing the distribution of pixels amongst those greyscale values. When represented as a plot, the x-axis is the intensity value from 0 to 255, and the y-axis is the number of pixels with that intensity value. The y-axis varies depending on the number of the pixels in the image and how their intensities are distributed as shown in figure 2. An image has only one histogram, but many images may have the same histogram. Histograms have many uses. One of the more common is to determine if the overall intensity in the image is high enough for this inspection task. Histogram is used to determine whether an image contains distinct regions of certain grayscale values. If the image has poor dynamic range, then the histogram confirms what one can see by visual inspection. It provides a general description of the appearance of an image and helps identify various components such as the background, objects, and noise. How Histogram Works The operation is very simple. The image is scanned in a single pass and a running count of the number of pixels found at each intensity value is kept. This is then used to construct a suitable histogram. The histogram of an 8-bit image, for example can be thought of as a table with 256 entries, or ‘bins’, indexed from 0 to 255. In bin 0 we record the number of times a gray level of 0 occurs; in bin 1 we record the number of times a grey level of 1 occurs, and so on, up to bin 255.
  • 2. Techniques for comparing two image files Step1: read images Read two grayscale images into the workspace. Step 2: Resize images To make the image comparison easier, resize the images to have the same width. Step 3: Find matching features between images Step 4: Display error message on the computer monitor screen, if images are not matched. Flow chart for comparing two image files Figure1. Flow chart for comparing two image files Image test in simulation mode The following steps are a procedure to test the image in simulation mode. 1. Make sure image files are loaded into the workspace without any issues. 2. Make sure a correct file is loaded 3. Plot histogram of the image 4. Verify that the histogram value is correct. 5. Positive test: load two image files which have 2 different images and verify that the test results show the difference.
  • 3. 6. Negative test: load two image files which have 2 similar images and verify that the test results show the same thing or match. Software Matlab R2015b Labview 2014 Summary of results The following figure illustrates the difference between the displays of the histogram of the same image in a linear and the results of the techniques and flow chart for comparing two image files above. Figure2. Matlab results for comparing two images which are identical.
  • 4. Figure3. Matlab results for comparing two images which are not identical. The object being viewed is light in color and it is placed on a dark background, and so the histogram exhibits a good bi-modal distribution. One peak represents the object pixels, other represents the background.
  • 5. Figure4. Matlab results for comparing two images which are not identical. The object being viewed is dark in color and it is placed on a light background, and so the histogram exhibits a good bi-modal distribution. One peak represents the object pixels, one represents the background. The peak represents of back ground is at the highest intensity value, X = 241.
  • 6. Figure5. Matlab results for comparing two hex pin images which are identical. The resulting of histograms above showed a large spike at 250 intensity value which results in the rest of the histogram being scaled up to 256.
  • 7. Figure6. Matlab results for comparing two hex pin images which are not identical
  • 8. Figure7. Labview results for comparing two image files which are identical
  • 9. Figure8. Labview results for comparing two image files which are not identical These results showed that the method of comparing two image files can be used for detecting of human errors for channel-not-loaded-correctly issue. A histogram is the frequency distribution of the gray levels with the number of pure black values displayed on the left and number of pure white values on the right.
  • 10. Matlab Code for comparing two image files. %% Matlab Code: % Author: Minh Anh Nguyen (minhanhnguyen@q.com) %This function will perform the followign tasks: %1. read in two ".png" file, display both images on the computer screen. %2. histogram of the images % 3. compare both image files. % 4. display a message on the computer screen if both image are not the % same. function [imagefunction] = imagefunction( file1, file2 ); % clear all; % Erase all existing variables. close all; % Close all figures (except those of imtool.) clc;% Clear the command window. imtool close all; % Close all imtool figures. workspace; % Make sure the workspace panel is showing. fontSize = 20; %%%%%%%%%%%%% % %% team: edit your file here % %%% set the path % folder = 'I:F2015_486Aimage'; % %reading images as array to variable 'a' & 'b'. image1 = imread( file1 ); image2= imread( file2 ); % % %reading images as array to variable 'a' & 'b'. % image1 = imread('Loaded-Mid Channel.PNG'); % image2= imread('Gross Misloaded-Mid Channel.PNG'); % % %% info imfinfo( file1 ) imfinfo( file2) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % do not edit anything below here!!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% a = image1; b = image2; %% size a1= size(a); b1= size (b); figure; [rows columns numberOfColorBands] = size(a); subplot(2, 2, 1); imshow(a, []); title('Reference image', 'Fontsize', fontSize); set(gcf, 'Position', get(0,'Screensize')); % Maximize figure. redPlane = a(:, :, 1);
  • 11. greenPlane = a(:, :, 2); bluePlane = a(:, :, 3); [rows columns numberOfColorBands] = size(b); subplot(2, 2, 3); imshow(b, []); title('Image2', 'Fontsize', fontSize); set(gcf, 'Position', get(0,'Screensize')); % Maximize figure. redPlane1 = b(:, :, 1); greenPlane1 = b(:, :, 2); bluePlane1 = b(:, :, 3); % Let's get its histograms. [pixelCountR grayLevelsR] = imhist(redPlane); subplot(2, 2, 2); %plot(pixelCountR, 'r'); stem(grayLevelsR,pixelCountR, 'r'); title('Histogram of Reference image', 'Fontsize', fontSize); xlabel('Intensity values','Fontsize', fontSize); ylabel('Number of pixels', 'Fontsize', fontSize); xlim([0 grayLevelsR(end)]); % Scale x axis manually. [pixelCountR1 grayLevelsR1] = imhist(redPlane1); subplot(2, 2, 4); %plot(pixelCountR1, 'r'); stem(grayLevelsR1,pixelCountR1); title('Histogram of Image2', 'Fontsize', fontSize); xlabel('Intensity values','Fontsize', fontSize); ylabel('Number of pixels','Fontsize', fontSize); xlim([0 grayLevelsR1(end)]); % Scale x axis manually. %check image for different different = a1- b1 if different==0 disp('The images are same')%output display else disp('the images are not same') msgbox('Test error. Please check your setting', 'Error') end;
  • 12. Labview Code for comparing two image files.