필터 지우기
필터 지우기

Eye status using histogram

조회 수: 3 (최근 30일)
Dalal Alhabsi
Dalal Alhabsi 2016년 5월 20일
댓글: Image Analyst 2021년 6월 10일
Hello i'm doing a project for fatigue detection in real time the problem that i get is with eye status, i want to use histogram to compare between open eye and close eye and then find the difference between them so i can detect eye blink,i found a code that is very helpful, the problem is i want to save a reference image which is (open eye) from the camera , and then compare it with other frames , how can i do that? i want the reference image saved from real time stored in other location so it can't overwrite with other image.
please help
  댓글 수: 1
Dalal Alhabsi
Dalal Alhabsi 2016년 5월 20일
Im1 = imread('Eeye1.jpg'); Im2 = imread('Eeye.jpg');
Im1 = rgb2gray(Im1); Im2 = rgb2gray(Im2);
% convert images to type double (range from from 0 to 1 instead of from 0 to 255) Im1 = im2double(Im1); Im2 = im2double(Im2);
% Calculate the Normalized Histogram of Image 1 and Image 2 hn1 = imhist(Im1)./numel(Im1); hn2 = imhist(Im2)./numel(Im2);
% Calculate the histogram error f = sum((hn1 - hn2).^2); f; %display the result to console subplot(3,4,[9 10 11 12]); plot(1:size(hn1,1),mean(hn1,2),'b'); hold on plot(1:size(hn2,1),mean(hn2,2),'r');
this is the code i use it for histogram

댓글을 달려면 로그인하십시오.

답변 (3개)

Image Analyst
Image Analyst 2016년 5월 20일
When the driving first starts, take the histogram average over many frames - like for a minute or so. The idea being that when they first start driving, their eyes will be open most of the time. Then after a certain number of frames, save out that average histogram.
Or just read how other people have successfully done it here: http://www.visionbib.com/bibliography/motion-f725.html#Driver%20Monitoring,%20Eyes,%20Gaze
  댓글 수: 2
Dalal Alhabsi
Dalal Alhabsi 2016년 5월 20일
but how can i convert that to image? like the code?
Image Analyst
Image Analyst 2016년 5월 20일
You can use MATLAB to write it yourself. Or you can contact the authors and ask if you can buy their code.

댓글을 달려면 로그인하십시오.


asd
asd 2016년 11월 22일
If you looking for the simplest method for the real time detection of the eye blinking which can be simply implemented. you find it in the blog (Designing a simple eye-blink detection algorithm for EEG). I hope this is what you want.
  댓글 수: 3
Vaishnavi M Pastay
Vaishnavi M Pastay 2021년 6월 10일
I am doing the project on Drowsiness Driver Detection using MatLab code. Here is the program for completely Eye opened and closed coding. Please can anyone help me for opened,closed, half closed and or about to close the eyes.
Image Analyst
Image Analyst 2021년 6월 10일
@Vaishnavi M Pastay, you said "Here is the program for completely Eye opened and closed coding." but you forgot to attach it or say where someone could get it. Are you talking about your own code, or the web site @asd mentioned but forgot to include (though I managed to find it and put the link for it in my comment above)?

댓글을 달려면 로그인하십시오.


Vaishnavi M Pastay
Vaishnavi M Pastay 2021년 6월 10일
And it also detect wearing a spectacule.

카테고리

Help CenterFile Exchange에서 Feature Detection and Extraction에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by