c++ - Cannot detect Faces using Offline Affectiva SDK -


i'm new affectiva emotion recognition sdk. have been following example video this link when feed pictures example this image face not detected. code looks:-

listener      class listener : public affdex::imagelistener{         void onimageresults(std::map<affdex::faceid,affdex::face> faces,affdex::frame image){             std::string pronoun="they";             std::string emotion="neutral";             (auto pair : faces){                 affdex::faceid faceid=pair.first;                 affdex::face face=pair.second;                 if(face.appearance.gender==affdex::gender::male){                     pronoun="male";                 }else if(face.appearance.gender==affdex::gender::female){                     pronoun="female";                 }                  if(face.emotions.joy>25){                     emotion="happy :)";                 }else if(face.emotions.sadness>25){                     emotion="sad :(";                 }                  cout<<faceid<<" : "<<pronoun <<" looks "<< emotion <<endl;             }          }         void onimagecapture(affdex::frame image){             cout<<"image captured"<<endl;         }     }; 

main code

    mat img;     img=imread(argv[1],cv_load_image_color);     affdex::frame frame(img.size().width, img.size().height, img.data, affdex::frame::color_format::bgr);     affdex::photodetector detector(3);     detector.setclassifierpath("/home/mitiku/affdex-sdk/data");     affdex::imagelistener * listener(new listener());     detector.setimagelistener(listener);     detector.setdetectallemotions(true);     detector.setdetectallexpressions(true);     detector.start();     detector.process(frame);     detector.stop(); 

where making mistake?or sdk cannot detect faces images? can body me?

edit used following images

enter image description hereenter image description here

sometimes sdk cannot detect faces in image. there no detector can detect faces time. did check different images?

edit:

those 2 images 250x250 , 260x194 , low quality. recommend test app higher resolution images. affectiva states in webpage minimum recommended resolution 320x240 , faces should @ least 30x30. https://developer.affectiva.com/obtaining-optimal-results/


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -