A string replacement of the original image paths can be done if the pictures location is different from the database (in the example “C:” will be replaced by “/media/HardDrive”). If the command line contains the argument -convert, then imagemagick will create all the face thumbshots (in the output folder with a folder for each person). OutputFolder -replaceRegex C: -replacement /media/HardDrive -convert /path/to/convert(.exe) Java -classpath ".:bin/:commons-cli-1.2.jar:commons-io-2.4.jar" PicasaFaces -folder "/path/to/PicasaDB/Picasa2/db3/" -output. Java -classpath ".:bin/:commons-cli-1.2.jar" PMPDB -folder "/path/to/PicasaDB/Picasa2/db3/" -output. There are in fact 2 programs, one called PMPDB that will convert the pmp tables into csv files and one called PicasaFaces that will create a nice human readable csv with all the face information and the face thumbshots. How to use the program to parse Picasa database ? If imagemagick is installed (and the convert application is in the path), the software can create thumbshots of all the faces. One file per table pmp and one file for the faces. I have created a software that parse all those information and store them in csv files. So, we just need to read the reference album of the image 268 and associate it with the image file 266. The rectangle in the image 266 will contain all face rectangles present in the image (when the image has more than one face identified, otherwise the rectangle will be the same as the one of the single person). In the previous example, the virtual picture 268 (which has no filename) is linked to the image 266 and will contain information on the face of one person (1 virtual image per person). Picasa will actually add a virtual image to store this information. If we merge the table imagedata and the data from thumbindex.db, for a specific image, we have the filename, the face rectangle but no album reference to associate the face to a person! See for more information on the thumbindex.db file. In this example the image 266 is in the folder 5. How to read thumbindex.db ?Ī line will be either a folder with its complete path and a specific index value ( 4294967295), or an image with its filename and an index value pointing to the parent folder.Įxtract from the file thumbindex.db from Picasa 3.9 the line x in thumbindex.db file will correspond to the same image as the line x in the table imagedata. This file contains the whole list of folders and files indexed inside the Picasa database. This information is held in the file thumbindex.db. With those information, we know that the image x has a rectangle corresponding to a specific person but we don’t know yet the file name of the picture. Multiply by the width (3264) and the height (2448) The absolute values can be obtained by multiplying the values by the width and height of the picture. The 4 numbers, once divided by 2^16-1 (the maximum value), are the relative coordinates of the top left corner and the bottom right corner. A 64 bit number breakable in 4 16-bit numbers. The rectangle is described by a value in the format rectangle64. The interesting values for faces are facerect (rectangle coordinates) and personalbumid (album reference) in the table imagedata, and the values token (album reference) and name (person name) in the table albumdata.Įxtract from the table imagedata from Picasa 3.9 The header is described by the following table : Sizeĭates, Microsoft Variant Time format, 8 bytes PMP files are binary files in little-endian format. Imagedata, images data (includes rectangles and references albums) How to read PMP files ? The Picasa database contains 3 tables:Īlbumdata, which contains information on the albums (folders and face album)Ĭatdata, categories data (almost empty on my computer) The name of the file is table_column.pmp. Each PMP file contains a column of a table in the database. In this folder, we can found mainly pmp and db files. On Windows 7, the Picasa database is located in C:\Users\USERNAME\AppData\Local\Google\Picasa2. I need the person names, the image filename and the rectangle associated with each face. What I would like to do: extract the raw face recognition information from the Picasa database. Retrieving information from Picasa is not an easy thing, the software is quite limited and hardly offers any data export function.
0 Comments
Leave a Reply. |