Can you help me out by rectifying the code?
2 views (last 30 days)
Show older comments
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 Comment
Image Analyst
on 16 May 2022
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.
Answers (0)
See Also
Categories
Find more on Image and Video Ground Truth Labeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!