Ask Your Question
0

what does the content means in a .vec file? while creating the samples using opencv_createsamples.

asked 2018-02-27 06:28:01 -0600

saideepthik gravatar image

Hi, i want to know how vector file creates below data using an image. 0000000 007d 0000 09c4 0000 0000 0000 2700 0e00 0000010 1d00 5e00 0f00 1500 5f00 4e00 8200 8600 0000020 3200 3800 3100 7700 2800 8000 5d00 a500............ like this. what does each line representing? someone explained like this
The format of a .vec file is:

4 bytes denoting number of total images (int)
4 bytes denoting size of images (int)
2 bytes denoting min value (short)
2 bytes denoting max value (short)

ex:     6400 0000 4605 0000 0000 0000

    hex     6400 0000   4605 0000       0000        0000
            # images    size of h * w       min     max
    dec         100         1350            0       0

but it doesn't made us to understand. please help in detailed way. thanks in advance!

edit retag flag offensive close merge delete

Comments

much better, thank you ;)

berak gravatar imageberak ( 2018-02-27 06:32:58 -0600 )edit

Why would you want to understand the actual contents of the vec file? Its just a format that is optimized for fast reading during the training of a cascade?

StevenPuttemans gravatar imageStevenPuttemans ( 2018-02-27 08:28:51 -0600 )edit

just i'm learning the algorithm of haar cascade classifier in depth. so i want to know how this format can be read as a image. here in mergevec.py they mentioned like struct.unpack(<iihh)....... means="" <iihh="" indicates="" little="" endian="" format="" -narrator="" specifies.="" so="" its="" a="" data="" in="" terms="" of="" binary="" format="" of="" an="" +ve="" image.="" for="" example:="" img="cv2.imread("1.jpg",0)" if="" we="" see="" the="" content="" of="" image="" its="" bulk="" of="" arrays="" with="" rgb="" values="" of="" each="" pixel="" gathering="" 3bytes="" of="" data.="" in="" the="" similar="" way="" i="" want="" to="" know="" what="" it="" indicates..........="" 0000000="" 007d="" 0000="" 09c4="" 0000="" 0000="" 0000="" 2700="" 0e00.<="" p="">

out of curiosity asking!

saideepthik gravatar imagesaideepthik ( 2018-02-27 22:50:28 -0600 )edit

See my response in your previous question... again I think its a waste of time trying to grasp the *.vec format. You do not need to understand it to understand what is happening during training.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-02-28 02:59:26 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-02-28 03:07:10 -0600

saideepthik gravatar image

ok steven thanks for suggestion.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-27 06:28:01 -0600

Seen: 328 times

Last updated: Feb 27 '18