Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
still image from video

Subject: still image from video

From: Jessica

Date: 2 Mar, 2011 16:50:15

Message: 1 of 2

Hi,

I am trying to save a still image with the exact same resolution (640 x 480 pixels) of the original video from which the image is taken:

MovieFile = mmreader('01.mov');
FirstFrame=read(MovieFile, 1);
imshow(FirstFrame);
print('-dbmp','-r300','picture1')

However, the saved image is much larger (2400 × 1800) and includes a white border.

Does anyone know how to remove the white border and only same the image with 640 x 480 pixel resolution?

Thanks!

Subject: still image from video

From: Jessica

Date: 2 Mar, 2011 16:58:04

Message: 2 of 2

"Jessica" wrote in message <iklsg7$2ko$1@fred.mathworks.com>...
> Hi,
>
> I am trying to save a still image with the exact same resolution (640 x 480 pixels) of the original video from which the image is taken:
>
> MovieFile = mmreader('01.mov');
> FirstFrame=read(MovieFile, 1);
> imshow(FirstFrame);
> print('-dbmp','-r300','picture1')
>
> However, the saved image is much larger (2400 × 1800) and includes a white border.
>
> Does anyone know how to remove the white border and only same the image with 640 x 480 pixel resolution?
>
> Thanks!

I actually figure it out:

iptsetpref('ImshowBorder','tight');
print('-dbmp','-r80','picture1')

Thanks anyway!

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us