5.0

5.0 | 1 rating Rate this file 267 downloads (last 30 days) File Size: 3.21 MB File ID: #19020

Machine Vision System - Color Recognition

by Vihang Patil

 

03 Mar 2008 (Updated 03 Mar 2008)

This gui is a demonstration on the concept of machine vision system for color recognition

Download Now | Watch this File

File Information
Description

This gui is a simple demonstration of machine vision system deployed for color matching.  
The opening gui program is eyekon.m and the rest of the m files are either supporting or function files.  
 
USAGE: eyekon  
 
Except the main color matching function which are the p-files, I have all other functions as m files to  
 
protect the I.P.  
This is an actual implementation of the system at one of the 2 wheeler vehicle manufacturing company  
I have modified a little as the main implementation required camera interface and hardware triggering  
 
The main objective of this project were are:  
1. To identify the three basic colors, i.e red, black and blue on hardware trigger,<I have modified this part  
 
as hardware triggering would have had been difficult to simulate for everyone, so it is either timer based  
 
"Auto Inspect" or "Manual Inspect" >  
2. Give out an Audio -Visual Indication on Color Change  
3. Display a "model" wearing that specific colored dress on color change  
4. Display NOCOLOR when color is not identified  
5. Functions like Auto Hide, Animation on/off, Audio indication on/off etc  
6. Control Panel to add more colors  
7. This program also stores last selected parameters on gui close, like position, auto hide, sound alert  
 
and on_top parameters.  
 
I would like to thank all those who contributed to making this code a success. The link of the thread  
 
found here < http://www.mathworks.com/matlabcentral/newsreader/view_thread/164139 >  
 
User comments welcome

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
splash.m(revised), setWindowState, setWindowOnTop

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.3 (R2006b)
Other requirements Tested only R2006b and Windows XP SP2.
Zip File Content  
Other Files
vehicle color identification system/control_panel.fig,
vehicle color identification system/control_panel.m,
vehicle color identification system/data/black.mat,
vehicle color identification system/data/blue.mat,
vehicle color identification system/data/blue1.mat,
vehicle color identification system/data/blue2.mat,
vehicle color identification system/data/red.mat,
vehicle color identification system/data/red1.mat,
vehicle color identification system/data/red2.mat,
vehicle color identification system/data/silver.mat,
vehicle color identification system/data/silver1.mat,
vehicle color identification system/data.mat,
vehicle color identification system/eyekon.m,
vehicle color identification system/images/black.jpg,
vehicle color identification system/images/blue.jpg,
vehicle color identification system/images/green.JPG,
vehicle color identification system/images/olive green.JPG,
vehicle color identification system/images/orange.jpg,
vehicle color identification system/images/red.jpg,
vehicle color identification system/images/silver.jpg,
vehicle color identification system/images/Thumbs.db,
vehicle color identification system/images/white.jpg,
vehicle color identification system/images/yellow.jpg,
vehicle color identification system/intialcheck.m,
vehicle color identification system/lab_color_fcn.p,
vehicle color identification system/maingui.fig,
vehicle color identification system/maingui.m,
vehicle color identification system/model_color.m,
vehicle color identification system/product images/image0.jpg,
vehicle color identification system/product images/image1.jpg,
vehicle color identification system/product images/image10.jpg,
vehicle color identification system/product images/image100.jpg,
vehicle color identification system/product images/image101.jpg,
vehicle color identification system/product images/image102.jpg,
vehicle color identification system/product images/image103.jpg,
vehicle color identification system/product images/image104.jpg,
vehicle color identification system/product images/image105.jpg,
vehicle color identification system/product images/image106.jpg,
vehicle color identification system/product images/image107.jpg,
vehicle color identification system/product images/image108.jpg,
vehicle color identification system/product images/image109.jpg,
vehicle color identification system/product images/image11.jpg,
vehicle color identification system/product images/image110.jpg,
vehicle color identification system/product images/image111.jpg,
vehicle color identification system/product images/image112.jpg,
vehicle color identification system/product images/image113.jpg,
vehicle color identification system/product images/image114.jpg,
vehicle color identification system/product images/image115.jpg,
vehicle color identification system/product images/image116.jpg,
vehicle color identification system/product images/image117.jpg,
vehicle color identification system/product images/image118.jpg,
vehicle color identification system/product images/image119.jpg,
vehicle color identification system/product images/image12.jpg,
vehicle color identification system/product images/image120.jpg,
vehicle color identification system/product images/image121.jpg,
vehicle color identification system/product images/image122.jpg,
vehicle color identification system/product images/image123.jpg,
vehicle color identification system/product images/image124.jpg,
vehicle color identification system/product images/image125.jpg,
vehicle color identification system/product images/image126.jpg,
vehicle color identification system/product images/image127.jpg,
vehicle color identification system/product images/image128.jpg,
vehicle color identification system/product images/image129.jpg,
vehicle color identification system/product images/image13.jpg,
vehicle color identification system/product images/image130.jpg,
vehicle color identification system/product images/image14.jpg,
vehicle color identification system/product images/image15.jpg,
vehicle color identification system/product images/image16.jpg,
vehicle color identification system/product images/image17.jpg,
vehicle color identification system/product images/image18.jpg,
vehicle color identification system/product images/image19.jpg,
vehicle color identification system/product images/image2.jpg,
vehicle color identification system/product images/image20.jpg,
vehicle color identification system/product images/image21.jpg,
vehicle color identification system/product images/image22.jpg,
vehicle color identification system/product images/image23.jpg,
vehicle color identification system/product images/image24.jpg,
vehicle color identification system/product images/image25.jpg,
vehicle color identification system/product images/image26.jpg,
vehicle color identification system/product images/image27.jpg,
vehicle color identification system/product images/image28.jpg,
vehicle color identification system/product images/image29.jpg,
vehicle color identification system/product images/image3.jpg,
vehicle color identification system/product images/image30.jpg,
vehicle color identification system/product images/image31.jpg,
vehicle color identification system/product images/image32.jpg,
vehicle color identification system/product images/image33.jpg,
vehicle color identification system/product images/image34.jpg,
vehicle color identification system/product images/image35.jpg,
vehicle color identification system/product images/image36.jpg,
vehicle color identification system/product images/image37.jpg,
vehicle color identification system/product images/image38.jpg,
vehicle color identification system/product images/image39.jpg,
vehicle color identification system/product images/image4.jpg,
vehicle color identification system/product images/image40.jpg,
vehicle color identification system/product images/image41.jpg,
vehicle color identification system/product images/image42.jpg,
vehicle color identification system/product images/image43.jpg,
vehicle color identification system/product images/image44.jpg,
vehicle color identification system/product images/image45.jpg,
vehicle color identification system/product images/image46.jpg,
vehicle color identification system/product images/image47.jpg,
vehicle color identification system/product images/image48.jpg,
vehicle color identification system/product images/image49.jpg,
vehicle color identification system/product images/image5.jpg,
vehicle color identification system/product images/image50.jpg,
vehicle color identification system/product images/image51.jpg,
vehicle color identification system/product images/image52.jpg,
vehicle color identification system/product images/image53.jpg,
vehicle color identification system/product images/image54.jpg,
vehicle color identification system/product images/image55.jpg,
vehicle color identification system/product images/image56.jpg,
vehicle color identification system/product images/image57.jpg,
vehicle color identification system/product images/image58.jpg,
vehicle color identification system/product images/image59.jpg,
vehicle color identification system/product images/image6.jpg,
vehicle color identification system/product images/image60.jpg,
vehicle color identification system/product images/image61.jpg,
vehicle color identification system/product images/image62.jpg,
vehicle color identification system/product images/image63.jpg,
vehicle color identification system/product images/image64.jpg,
vehicle color identification system/product images/image65.jpg,
vehicle color identification system/product images/image66.jpg,
vehicle color identification system/product images/image67.jpg,
vehicle color identification system/product images/image68.jpg,
vehicle color identification system/product images/image69.jpg,
vehicle color identification system/product images/image7.jpg,
vehicle color identification system/product images/image70.jpg,
vehicle color identification system/product images/image71.jpg,
vehicle color identification system/product images/image72.jpg,
vehicle color identification system/product images/image73.jpg,
vehicle color identification system/product images/image74.jpg,
vehicle color identification system/product images/image75.jpg,
vehicle color identification system/product images/image76.jpg,
vehicle color identification system/product images/image77.jpg,
vehicle color identification system/product images/image78.jpg,
vehicle color identification system/product images/image79.jpg,
vehicle color identification system/product images/image8.jpg,
vehicle color identification system/product images/image80.jpg,
vehicle color identification system/product images/image81.jpg,
vehicle color identification system/product images/image82.jpg,
vehicle color identification system/product images/image83.jpg,
vehicle color identification system/product images/image84.jpg,
vehicle color identification system/product images/image85.jpg,
vehicle color identification system/product images/image86.jpg,
vehicle color identification system/product images/image87.jpg,
vehicle color identification system/product images/image88.jpg,
vehicle color identification system/product images/image89.jpg,
vehicle color identification system/product images/image9.jpg,
vehicle color identification system/product images/image90.jpg,
vehicle color identification system/product images/image91.jpg,
vehicle color identification system/product images/image92.jpg,
vehicle color identification system/product images/image93.jpg,
vehicle color identification system/product images/image94.jpg,
vehicle color identification system/product images/image95.jpg,
vehicle color identification system/product images/image96.jpg,
vehicle color identification system/product images/image97.jpg,
vehicle color identification system/product images/image98.jpg,
vehicle color identification system/product images/image99.jpg,
vehicle color identification system/product images/Thumbs.db,
vehicle color identification system/random_integer_generator.m,
vehicle color identification system/setWindowOnTop.m,
vehicle color identification system/setWindowState.m,
vehicle color identification system/splash.m,
vehicle color identification system/startupdata.mat,
vehicle color identification system/thirdeye.kon,
vehicle color identification system/validate_color_new.p,
vehicle color identification system/validate_color_ref.p,
vehicle color identification system/warning.wav
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
09 Oct 2008 Samuel Sam I execute eyekon but encountered the following errors:  
 
??? Error using ==> load  
Unable to read MAT file C:\MATLAB6p5\work\maingui.fig  
 
See FILEFORMATS for a list of known file types and the functions used to read them.  
 
Error in ==> C:\MATLAB6p5\toolbox\matlab\iofun\hgload.m  
On line 45 ==> fileVars = load(filename,'-mat');  
 
Error in ==> C:\MATLAB6p5\toolbox\matlab\graphics\openfig.m  
On line 89 ==> [figs, oldvis] = hgload(filename, struct('Visible','off'));  
 
Error in ==> C:\MATLAB6p5\toolbox\matlab\uitools\gui_mainfcn.m (local_openfig)  
On line 184 ==> gui_hFigure = openfig(name, singleton, 'auto');  
 
Error in ==> C:\MATLAB6p5\toolbox\matlab\uitools\gui_mainfcn.m  
On line 82 ==> gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt);  
 
Error in ==> C:\MATLAB6p5\work\maingui.m  
On line 40 ==> [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});  
 
Error in ==> C:\MATLAB6p5\work\eyekon.m  
On line 2 ==> h = maingui;  
 
Can you tell me what's wrong with my configuration. Thanks!  
29 Oct 2008 Vihang Patil Samuel. This program is developed in R2006b, a version which is much more newer than the one you are using Matlab6p5. You will need to update your software to atleast R2006b or higher
Please login to add a comment or rating.

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com