Can you help me out by rectifying the code?
2 次查看(过去 30 天)
显示 更早的评论
currently I am working on my project to detect vechile on road using MATLAB and ip webcam. So my first work is to detect the vehicle from a video then interface ip webcam. I download a video from internet.to do the first part.But it gives some error ..I cannot find the mistake....so please anybody help me....I put my code and the errors......Thank you in advanced...
vidObj = VideoReader('C:\Users\User\Desktop\vehicles\cars.mp4');
vidObj.CurrentTime = 0.1;
I = readFrame(vidObj);
data = load('FCWDemoMonoCameraSensor.mat', 'sensor');
sensor = data.sensor;
detector = vehicleDetectorACF();
vehicleWidth = [1.5, 2.5];
detector = configureDetectorMonoCamera(detector, sensor, vehicleWidth);
[bboxes, ~] = detect(detector, I);
Iout = insertShape(I, 'rectangle', bboxes);
figure;
imshow(Iout)
title('Detected Vehicles')
ERRORS:
Error using vision.internal.inputValidation.checkImageSize (line 14)
Image size is not consistent with camera intrinsics. It is likely that the image is not generated by the specified
camera.
Error in acfObjectDetectorMonoCamera/detect (line 170)
vision.internal.inputValidation.checkImageSize(I, this.Camera.Intrinsics.ImageSize);
Error in giant (line 21)
[bboxes, ~] = detect(detector, I);
1 个评论
Image Analyst
2022-5-16
Not sure what rectifying means in this context. Do you mean "correcting" or "fixing"?
Anyway it's saying that your camera did not acquire the info stored in your .mat file. Is that the case? If so, make sure the camera parameters used to save the data match your camera.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image and Video Ground Truth Labeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!