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:
Creating image database to implement Viola Jones face detection method

Subject: Creating image database to implement Viola Jones face detection method

From: Noopur

Date: 23 Jul, 2013 05:53:07

Message: 1 of 6

Hi,

Is it the necessity to create my image database in .pgm format to implement Viola Jones face detection method. Can I create my image database for training in .jpg format.

Thanks in advance

Subject: Creating image database to implement Viola Jones face detection

From: Dima Lisin

Date: 23 Jul, 2013 13:48:54

Message: 2 of 6

On 07/23/13 01:53, Noopur wrote:
> Hi,
>
> Is it the necessity to create my image database in .pgm format to
> implement Viola Jones face detection method. Can I create my image
> database for training in .jpg format.
>
> Thanks in advance

Hi Noopur,

This depends on what tools or libraries you are using. Are you
implementing the Viola-Jones algorithm from scratch?

The Computer Vision System Toolbox for MATLAB has a function called
trainCascadeObjectDetector(), which lets you train your own Viola-Jones
detector. This function takes images in any format that can be read by
imread().

Here is a link to some documentation:
http://www.mathworks.com/help/vision/ug/train-a-cascade-object-detector.html

Dima

Subject: Creating image database to implement Viola Jones face detection

From: Noopur

Date: 23 Jul, 2013 14:50:21

Message: 3 of 6

Hi Dima,

Thanks a lot for your time.

I am using Image processing and Data acquisition toolboxes (not computer vision system toolbox).

I downloaded face and non face images from CMU site. Then I realized all images in mostly all databases are .png. I believe for speed factor we are using .png images.
To create my own database I am opting .jpg images to see the differences, if any.

Thanks for the link. I'll explore the topic.

Regards.

Dima Lisin <dima.lisin@mathworks.com> wrote in message <ksm1k6$b7d$1@newscl01ah.mathworks.com>...
> On 07/23/13 01:53, Noopur wrote:
> > Hi,
> >
> > Is it the necessity to create my image database in .pgm format to
> > implement Viola Jones face detection method. Can I create my image
> > database for training in .jpg format.
> >
> > Thanks in advance
>
> Hi Noopur,
>
> This depends on what tools or libraries you are using. Are you
> implementing the Viola-Jones algorithm from scratch?
>
> The Computer Vision System Toolbox for MATLAB has a function called
> trainCascadeObjectDetector(), which lets you train your own Viola-Jones
> detector. This function takes images in any format that can be read by
> imread().
>
> Here is a link to some documentation:
> http://www.mathworks.com/help/vision/ug/train-a-cascade-object-detector.html
>
> Dima

Subject: Creating image database to implement Viola Jones face detection

From: Dima Lisin

Date: 23 Jul, 2013 18:01:35

Message: 4 of 6

No problem. Please check out the Computer Vision System Toolbox. It
includes an object called vision.CascadeObjectDetector, which implements
the Viola-Jones algorithm. It comes with several pre-trained models for
detecting frontal faces, profile faces, upper body, eyes, and noses.
And, as I said before, there is also a function for training your own
model. Depending on what you are trying to do, these tools may solve
your problem.

As far as png vs jpg, I think the main issue here is compression. png
uses lossless compression, while jpg uses lossy compression, which
introduces artifacts into your images. These artifacts are typically not
very visible to a human eye, but they may have an affect on your
classifier. On the other hand, jpg images are ubiquitous, so it may be a
good thing to train a detector that works well on them.

Dima

On 07/23/13 10:50, Noopur wrote:
> Hi Dima,
>
> Thanks a lot for your time.
>
> I am using Image processing and Data acquisition toolboxes (not computer
> vision system toolbox).
> I downloaded face and non face images from CMU site. Then I realized all
> images in mostly all databases are .png. I believe for speed factor we
> are using .png images.
> To create my own database I am opting .jpg images to see the
> differences, if any.
>
> Thanks for the link. I'll explore the topic.
>
> Regards.
>
> Dima Lisin <dima.lisin@mathworks.com> wrote in message
> <ksm1k6$b7d$1@newscl01ah.mathworks.com>...
>> On 07/23/13 01:53, Noopur wrote:
>> > Hi,
>> >
>> > Is it the necessity to create my image database in .pgm format to
>> > implement Viola Jones face detection method. Can I create my image
>> > database for training in .jpg format.
>> >
>> > Thanks in advance
>>
>> Hi Noopur,
>>
>> This depends on what tools or libraries you are using. Are you
>> implementing the Viola-Jones algorithm from scratch?
>>
>> The Computer Vision System Toolbox for MATLAB has a function called
>> trainCascadeObjectDetector(), which lets you train your own
>> Viola-Jones detector. This function takes images in any format that
>> can be read by imread().
>>
>> Here is a link to some documentation:
>> http://www.mathworks.com/help/vision/ug/train-a-cascade-object-detector.html
>>
>>
>> Dima

Subject: Creating image database to implement Viola Jones face detection

From: Noopur

Date: 23 Jul, 2013 18:27:20

Message: 5 of 6

sure. I'll do.

I am grateful to you for pgm vs. jpg explanation.

Dima Lisin <dima.lisin@mathworks.com> wrote in message <ksmgdv$o07$1@newscl01ah.mathworks.com>...
> No problem. Please check out the Computer Vision System Toolbox. It
> includes an object called vision.CascadeObjectDetector, which implements
> the Viola-Jones algorithm. It comes with several pre-trained models for
> detecting frontal faces, profile faces, upper body, eyes, and noses.
> And, as I said before, there is also a function for training your own
> model. Depending on what you are trying to do, these tools may solve
> your problem.
>
> As far as png vs jpg, I think the main issue here is compression. png
> uses lossless compression, while jpg uses lossy compression, which
> introduces artifacts into your images. These artifacts are typically not
> very visible to a human eye, but they may have an affect on your
> classifier. On the other hand, jpg images are ubiquitous, so it may be a
> good thing to train a detector that works well on them.
>
> Dima
>
> On 07/23/13 10:50, Noopur wrote:
> > Hi Dima,
> >
> > Thanks a lot for your time.
> >
> > I am using Image processing and Data acquisition toolboxes (not computer
> > vision system toolbox).
> > I downloaded face and non face images from CMU site. Then I realized all
> > images in mostly all databases are .png. I believe for speed factor we
> > are using .png images.
> > To create my own database I am opting .jpg images to see the
> > differences, if any.
> >
> > Thanks for the link. I'll explore the topic.
> >
> > Regards.
> >
> > Dima Lisin <dima.lisin@mathworks.com> wrote in message
> > <ksm1k6$b7d$1@newscl01ah.mathworks.com>...
> >> On 07/23/13 01:53, Noopur wrote:
> >> > Hi,
> >> >
> >> > Is it the necessity to create my image database in .pgm format to
> >> > implement Viola Jones face detection method. Can I create my image
> >> > database for training in .jpg format.
> >> >
> >> > Thanks in advance
> >>
> >> Hi Noopur,
> >>
> >> This depends on what tools or libraries you are using. Are you
> >> implementing the Viola-Jones algorithm from scratch?
> >>
> >> The Computer Vision System Toolbox for MATLAB has a function called
> >> trainCascadeObjectDetector(), which lets you train your own
> >> Viola-Jones detector. This function takes images in any format that
> >> can be read by imread().
> >>
> >> Here is a link to some documentation:
> >> http://www.mathworks.com/help/vision/ug/train-a-cascade-object-detector.html
> >>
> >>
> >> Dima

Subject: Creating image database to implement Viola Jones face detection method

From: mehdi.amini82@gmail.com

Date: 23 Jul, 2013 21:23:11

Message: 6 of 6

Hi
I have a lot of files with ".ls1" as extention.
I must read them in Matlab but they are not recognizable
For Matlab!
Ls1 files could be imported in excel software and be saved as
.xls or .xlsx files.
Since number of .ls1 files are about 100 so i cannot save them as .xls file one after another one because there are a lot of such fills. i should do is by the use of a simple way.
* it should be noted when i save as a .ls1 file as a .xls file a message appear i must click on "yes" so i cannot change their extention using windows extention control.
Please guide me
Thanks
mehdi.amini82@yahoo.com

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