How to convert image to frame

1 vue (au cours des 30 derniers jours)
Shalini Verma
Shalini Verma le 1 Mar 2017
Commenté : Shalini Verma le 4 Mar 2017
I have made the programe for locating centroid point on an object in a video. I have converted the video into image frames and located the point successfully but unable to convert the image again to video frame so as to move the point in the video. An error is coming
figure(5);
imshow(im,[]);colormap(gray);
figure(6)
M=im2frame(im);
Error using im2frame
double-precision indexed CData values must be legal colormap indices: 1.0 <= value <= length(colormap)
Error in a1 (line 70) M=im2frame(im);

Réponse acceptée

Image Analyst
Image Analyst le 1 Mar 2017
Evidently your im is double. It must be integer, like uint8 or uint16.
  1 commentaire
Shalini Verma
Shalini Verma le 4 Mar 2017
Thankyou :)

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by