Fire Detection Program not working

I=videoinput('winvideo',1,'YUY2_320x240');
triggerconfig(I,'manual');
counter=0;
set(I,'FramesPerTrigger',1);
set(I,'TriggerRepeat',Inf);
set(I,'ReturnedColorSpace','RGB');
start(I)
for i=1:5
trigger(I);
im=getdata(I);
end
figure,imshow(im);
hold on
in=rgb2ycbcr(im);
for x=1:320
for y=1:240
if in(y,x,1)>in(y,x,3) && in(y,x,3)>in(y,x,2)
plot(y,x);
end
end
end
stop(I),delete(I),clear I;
counter

댓글 수: 1

Walter Roberson
Walter Roberson 2012년 5월 5일
What error message are you encountering and at what line?

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

답변 (2개)

Image Analyst
Image Analyst 2012년 5월 5일

0 개 추천

It doesn't look like you're starting with an RGB image - it looks like you have this: YUY2_320x240. So why are you trying to convert it as if it were an RGB image with this line:
in=rgb2ycbcr(im);
You may be right, but I've not used cameras running in other than RGB mode.
Nikhil Yadav
Nikhil Yadav 2012년 5월 12일

0 개 추천

I had completed my project on this and I have codes of this project if any help you want then contact me my mail id is yadav9.nikhil@gmail.com

질문:

2012년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by