<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,<br>
I'm not sure if my request is in the KDE forum or better here,
I'll try this way too. <br>
</p>
<p>Maybe I am lucky and one of you can help me with my project.<br>
My goal is to extract all thumbnails of the face recognition from
the database. Preferably separable per person.<br>
<br>
I was already able to export all thumbnails (faces and
unfortunately the normal ones too) via SQL script and convert them
to PNG.<br>
<br>
Now I am missing the link to the registered faces/persons. <br>
Unfortunately, I could not find any connection to the face
database. Somehow DigiKam must know which picture ID, face ID and
thumbnail ID belong together.<br>
<br>
I am using MariaDB, after a migration from SQlite.<br>
To convert the PGF blob files (*.bin) into PNG, I use this tool<br>
<a href="https://github.com/cgilles/digikam-pgf-database"
class="postlink moz-txt-link-freetext">https://github.com/cgilles/digikam-pgf-database</a><br>
<br>
Here is the SQL script:<br>
</p>
<dl class="codebox">
<dt>Code:<a
href="https://forum.kde.org/viewtopic.php?f=255&t=176358#"><br>
</a></dt>
<dd><code><br>
DELIMITER $$<br>
CREATE OR REPLACE PROCEDURE procedure1()<br>
BEGIN<br>
DECLARE done INT DEFAULT 0;<br>
DECLARE file_name VARCHAR(255);<br>
DECLARE file_ext VARCHAR(255);<br>
DECLARE file_type VARCHAR(255);<br>
DECLARE cur CURSOR FOR SELECT id, modificationdate,
orientationHint FROM thumbnails;<br>
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;<br>
<br>
OPEN cur;<br>
<br>
REPEAT<br>
FETCH cur INTO file_name, file_ext, file_type;<br>
IF NOT done THEN<br>
SET @query = CONCAT("SELECT data FROM thumbnails WHERE
id = ", file_name, " INTO DUMPFILE
'D://images//",file_name,"_",file_type,".bin'");<br>
PREPARE stmt FROM @query;<br>
EXECUTE stmt;<br>
DEALLOCATE PREPARE stmt;<br>
<br>
END IF;<br>
UNTIL done END REPEAT;<br>
<br>
CLOSE cur;<br>
END<br>
$$<br>
DELIMITER ;<br>
<br>
CALL procedure1 ();<br>
DROP procedure procedure1;<br>
<br>
</code></dd>
</dl>
<p>Thx & Best regard</p>
<p><br>
</p>
<p>Related KDE forum topic:
<a class="moz-txt-link-freetext" href="https://forum.kde.org/viewtopic.php?f=255&t=176358">https://forum.kde.org/viewtopic.php?f=255&t=176358</a> </p>
</body>
</html>