How can generate `.pts` file for `.jpeg` or other image format ?

I am using AAMs matlab toolbox, the dataset provided includes images along with `.pts` file. I want to use my own images, how can i generate `.pts` file?

2 Comments

Yes Mr Walter. But unfortunately, there is no information for available there about my question

Sign in to comment.

Answers (2)

8 Comments

Thank You Mr. walter, but this do not solve my problem.Required `.pts` file looks like,
version: 1
n_points: 68
{
115.167660 220.807529
.
.
total 68 rows of column 2
.
.
}
Why not just write such a file yourself with a tiny bit of code? fopen(), fprintf() a couple of lines, fprintf() the matrix, fprintf() the trailer, fclose()
But i could not understand, what are those values. For example from the above example, `115.167660` what is this value, how can i generate for my images?
I would suspect that most people here have never heard nor used that toolbox. The only way we could answer your question would then be to read its documentation or its code to understand what a pts file and how to generate it.
This reading of the documentation, you can and should do yourself.
Failing that, your best chance is to contact the author.
According to the source code:
  • (only) the first .png file in the directory will be read, unless you change "gg" to another value
  • (only) the first .pts file in the directory will be read, unless you change "gg" to another value
  • the information in the .pts file is used to calculate the face size (but I did not look to see what is done with the face size)
  • otherwise the information in the .pts file is used as the "ground truth" to compare the effectiveness of the fitting, right at the end (and has no impact on the fitting.)
It would take more effort than I am willing to put in to figure out the order the points are to use.
  • The author's contact information is there and the author invites feedback, so you could ask the author.
Thank You Mr Walter, i have tried everything mentioned above, right from emailing the author(never replied) , reading the documentation,as well as changed the `gg` value for next images. Even i tried to put my image with dummy `.pts` file , but i could not work out. Thank you for your time, if you find any information please share.It will be very kind
My hands hurt too much (too much clicking and typing), so I am not going to investigate this further myself.
Mr Walter, Finally i got reply from Author. He said , we need to write `.pts` file our self and those values in the file are the `landmark` coordinates. That's all he said, i could not understand it completely.Finally i gave up. Sorry and Thank you

Sign in to comment.

Categories

Asked:

on 21 Oct 2015

Answered:

on 23 Dec 2018

Community Treasure Hunt

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

Start Hunting!