{"id":2052,"date":"2018-08-21T23:00:41","date_gmt":"2018-08-21T15:00:41","guid":{"rendered":"http:\/\/www.magicandlove.com\/blog\/?p=2052"},"modified":"2018-08-21T23:00:41","modified_gmt":"2018-08-21T15:00:41","slug":"face-landmark-detailed-information","status":"publish","type":"post","link":"http:\/\/www.magicandlove.com\/blog\/2018\/08\/21\/face-landmark-detailed-information\/","title":{"rendered":"Face landmark detailed information"},"content":{"rendered":"<p>Referring back to the post on <a href=\"http:\/\/www.magicandlove.com\/blog\/2018\/08\/19\/face-landmark-detection-in-opencv-face-module-with-processing\/\">face landmark detection<\/a>, the command to retrieve face landmark information is<\/p>\n<pre lang=\"java\">\r\nfm.fit(im.getBGR(), faces, shapes);\r\n<\/pre>\n<p>where <strong>im.getBGR()<\/strong> is the <strong>Mat<\/strong> variable of the input image; <strong>faces<\/strong> is the <strong>MatOfRect<\/strong> variable (a number of <strong>Rect<\/strong>) obtained from the face detection; <strong>shapes<\/strong> is the <strong>ArrayList&lt;MatOfPoint2f&gt;<\/strong> variable returning the face landmark details for each face detected.<\/p>\n<p>Each face is a <strong>MatOfPoint2f<\/strong> value. We can convert it to an array of <strong>Point<\/strong>. The array has length 68. Each point in the array corresponds to a face landmark feature point in the face as shown in the below image.<br \/>\n&nbsp;<br \/>\n<a href=\"http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/facemark0001.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/facemark0001-300x300.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-2053\" srcset=\"http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/facemark0001-300x300.png 300w, http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/facemark0001-150x150.png 150w, http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/facemark0001-768x768.png 768w, http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/facemark0001-100x100.png 100w, http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/facemark0001.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Referring back to the post on face landmark detection, the command to retrieve face landmark information is fm.fit(im.getBGR(), faces, shapes); where im.getBGR() is the Mat variable of the input image; faces is the MatOfRect variable (a number of Rect) obtained from the face detection; shapes is the ArrayList&lt;MatOfPoint2f&gt; variable returning the face landmark details for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89,79],"tags":[165,3,62],"class_list":["post-2052","post","type-post","status-publish","format-standard","hentry","category-research","category-software-2","tag-face-landmark","tag-opencv","tag-processing-org"],"_links":{"self":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/2052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/comments?post=2052"}],"version-history":[{"count":1,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/2052\/revisions"}],"predecessor-version":[{"id":2054,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/2052\/revisions\/2054"}],"wp:attachment":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/media?parent=2052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/categories?post=2052"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/tags?post=2052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}