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:
mmreader then read vs virtual dub frames then imread

Subject: mmreader then read vs virtual dub frames then imread

From: Wael

Date: 21 Jul, 2009 17:44:03

Message: 1 of 8

I have implemented a system that does some feature extraction from an image. My whole system is based on a video frames that have been extracted using virtual dub, then each frame is read through 'imread' command. Now i am just changing the system such that the input is the same movie that i extracted the frames from but first i am using 'mmreader' to load the file then i am using the 'read' command to read each frame.

Surprisingly the read image values through 'mmreader' is different than 'imread' from the frames. Even though they look the same !. Well even the 'mmreader' images has an rgb value ,which is should be between 0-255, has it between 0-248 whereas imread gives the correct reading 0-255 ...

So you please guide me what is going wrong, i am assuming since the rgb value range for the mmreader is between 0-248 then their might be something wrong in there...


Thank you

Subject: mmreader then read vs virtual dub frames then imread

From: us

Date: 21 Jul, 2009 17:57:02

Message: 2 of 8

"Wael " <wlouis@ryerson.ca> wrote in message <h44up3$e06$1@fred.mathworks.com>...
> I have implemented a system that does some feature extraction from an image. My whole system is based on a video frames that have been extracted using virtual dub, then each frame is read through 'imread' command. Now i am just changing the system such that the input is the same movie that i extracted the frames from but first i am using 'mmreader' to load the file then i am using the 'read' command to read each frame.
>
> Surprisingly the read image values through 'mmreader' is different than 'imread' from the frames. Even though they look the same !. Well even the 'mmreader' images has an rgb value ,which is should be between 0-255, has it between 0-248 whereas imread gives the correct reading 0-255 ...
>
> So you please guide me what is going wrong, i am assuming since the rgb value range for the mmreader is between 0-248 then their might be something wrong in there...
>
>
> Thank you

can you determine, which reader is used in IMREAD(?)...
do this

     edit imread;
% place a dbstop mark at line# 424 and 430 (note: r2009a), which call FEVAL...
% tell CSSM the result of

     fmt_s.read

us

Subject: mmreader then read vs virtual dub frames then imread

From: Wael

Date: 21 Jul, 2009 18:05:20

Message: 3 of 8

Thanks a lot us...

The result of fmt_s.read is
               @readjpg


"us " <us@neurol.unizh.ch> wrote in message <h44vhe$3cc$1@fred.mathworks.com>...
> "Wael " <wlouis@ryerson.ca> wrote in message <h44up3$e06$1@fred.mathworks.com>...
> > I have implemented a system that does some feature extraction from an image. My whole system is based on a video frames that have been extracted using virtual dub, then each frame is read through 'imread' command. Now i am just changing the system such that the input is the same movie that i extracted the frames from but first i am using 'mmreader' to load the file then i am using the 'read' command to read each frame.
> >
> > Surprisingly the read image values through 'mmreader' is different than 'imread' from the frames. Even though they look the same !. Well even the 'mmreader' images has an rgb value ,which is should be between 0-255, has it between 0-248 whereas imread gives the correct reading 0-255 ...
> >
> > So you please guide me what is going wrong, i am assuming since the rgb value range for the mmreader is between 0-248 then their might be something wrong in there...
> >
> >
> > Thank you
>
> can you determine, which reader is used in IMREAD(?)...
> do this
>
> edit imread;
> % place a dbstop mark at line# 424 and 430 (note: r2009a), which call FEVAL...
> % tell CSSM the result of
>
> fmt_s.read
>
> us

Subject: mmreader then read vs virtual dub frames then imread

From: Wael

Date: 21 Jul, 2009 21:23:03

Message: 4 of 8

Sorry for asking again.. .But how can i tell the CSSM the results ?


your help is appreciated


"Wael " <wlouis@ryerson.ca> wrote in message <h45010$4pa$1@fred.mathworks.com>...
> Thanks a lot us...
>
> The result of fmt_s.read is
> @readjpg
>
>
> "us " <us@neurol.unizh.ch> wrote in message <h44vhe$3cc$1@fred.mathworks.com>...
> > "Wael " <wlouis@ryerson.ca> wrote in message <h44up3$e06$1@fred.mathworks.com>...
> > > I have implemented a system that does some feature extraction from an image. My whole system is based on a video frames that have been extracted using virtual dub, then each frame is read through 'imread' command. Now i am just changing the system such that the input is the same movie that i extracted the frames from but first i am using 'mmreader' to load the file then i am using the 'read' command to read each frame.
> > >
> > > Surprisingly the read image values through 'mmreader' is different than 'imread' from the frames. Even though they look the same !. Well even the 'mmreader' images has an rgb value ,which is should be between 0-255, has it between 0-248 whereas imread gives the correct reading 0-255 ...
> > >
> > > So you please guide me what is going wrong, i am assuming since the rgb value range for the mmreader is between 0-248 then their might be something wrong in there...
> > >
> > >
> > > Thank you
> >
> > can you determine, which reader is used in IMREAD(?)...
> > do this
> >
> > edit imread;
> > % place a dbstop mark at line# 424 and 430 (note: r2009a), which call FEVAL...
> > % tell CSSM the result of
> >
> > fmt_s.read
> >
> > us

Subject: mmreader then read vs virtual dub frames then imread

From: Wael

Date: 24 Jul, 2009 19:42:02

Message: 5 of 8

Help is appreciated please....


"Wael " <wlouis@ryerson.ca> wrote in message <h45010$4pa$1@fred.mathworks.com>...
> Thanks a lot us...
>
> The result of fmt_s.read is
> @readjpg
>
>
> "us " <us@neurol.unizh.ch> wrote in message <h44vhe$3cc$1@fred.mathworks.com>...
> > "Wael " <wlouis@ryerson.ca> wrote in message <h44up3$e06$1@fred.mathworks.com>...
> > > I have implemented a system that does some feature extraction from an image. My whole system is based on a video frames that have been extracted using virtual dub, then each frame is read through 'imread' command. Now i am just changing the system such that the input is the same movie that i extracted the frames from but first i am using 'mmreader' to load the file then i am using the 'read' command to read each frame.
> > >
> > > Surprisingly the read image values through 'mmreader' is different than 'imread' from the frames. Even though they look the same !. Well even the 'mmreader' images has an rgb value ,which is should be between 0-255, has it between 0-248 whereas imread gives the correct reading 0-255 ...
> > >
> > > So you please guide me what is going wrong, i am assuming since the rgb value range for the mmreader is between 0-248 then their might be something wrong in there...
> > >
> > >
> > > Thank you
> >
> > can you determine, which reader is used in IMREAD(?)...
> > do this
> >
> > edit imread;
> > % place a dbstop mark at line# 424 and 430 (note: r2009a), which call FEVAL...
> > % tell CSSM the result of
> >
> > fmt_s.read
> >
> > us

Subject: mmreader then read vs virtual dub frames then imread

From: Nick Haddad

Date: 27 Jul, 2009 16:29:30

Message: 6 of 8

Wael,

What type of video files are you trying to read in (mpeg-1, avi, etc)?
it is possible that the video decoder that mmreader is using is doing
some sort of filtering which is limiting the results coming in. This
would be coming from the particular video codec you are using.

Also, what types of image files are saving to disc using Virtualdub
(.jpg, png., etc)? Is it possible that your source videos don't have
any true white (i.e 255) pixels, but saving the images in a lossless
form is creating compression artifacts with values of 255.

If you post which types of video files you are using that may give us
some more clues.

Thanks,
-Nick



Wael wrote:
> I have implemented a system that does some feature extraction from an image. My whole system is based on a video frames that have been extracted using virtual dub, then each frame is read through 'imread' command. Now i am just changing the system such that the input is the same movie that i extracted the frames from but first i am using 'mmreader' to load the file then i am using the 'read' command to read each frame.
>
> Surprisingly the read image values through 'mmreader' is different than 'imread' from the frames. Even though they look the same !. Well even the 'mmreader' images has an rgb value ,which is should be between 0-255, has it between 0-248 whereas imread gives the correct reading 0-255 ...
>
> So you please guide me what is going wrong, i am assuming since the rgb value range for the mmreader is between 0-248 then their might be something wrong in there...
>
>
> Thank you

Subject: mmreader then read vs virtual dub frames then imread

From: Bluebird

Date: 27 Jul, 2009 18:50:19

Message: 7 of 8

Hi Nick,


My Video is of type Codec Video 1 in an avi . The output of the virutaldub is jpeg images. Okay what is surprising me and cant find a proper answer to is the following:
 I am implementing a face detector, so when I feed the images resulted from the virtual dub which is supposed to have some kind of compression or coding, I get better results than when I just use the mmreader directly and feed the images.
This is not making sense to me!

Certainly, I can’t virtually distinguish any differences between the images when I display them.

Do you think that mmreader is doing some kind of manipulation to the data that it is making it different?

Subject: mmreader then read vs virtual dub frames then imread

From: Nick Haddad

Date: 29 Jul, 2009 15:36:13

Message: 8 of 8

As far as I know mmreader isn't doing data manipulation. To make sure
that the jpeg out put isn't manipulating your data you could try using
virtualdub to save out to an uncompressed image format like tiff or bmp.
  This should give you the raw image data from virtualdub so you can
compare it to what you are getting from mmreader.

-Nick

Bluebird wrote:
> Hi Nick,
>
>
> My Video is of type Codec Video 1 in an avi . The output of the virutaldub is jpeg images. Okay what is surprising me and cant find a proper answer to is the following:
> I am implementing a face detector, so when I feed the images resulted from the virtual dub which is supposed to have some kind of compression or coding, I get better results than when I just use the mmreader directly and feed the images.
> This is not making sense to me!
>
> Certainly, I can’t virtually distinguish any differences between the images when I display them.
>
> Do you think that mmreader is doing some kind of manipulation to the data that it is making it different?

Tags for 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