face-average | Averages faces from the input using OpenCV and Dlib | Computer Vision library
kandi X-RAY | face-average Summary
kandi X-RAY | face-average Summary
Averages faces from the input using OpenCV and Dlib
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Runs the image
- Compute the faces of the image
- Calculate Delaunay triangulation
- Warp two triangles
- Compute the similarity between two points
- Extract features from images
- Checks if the given point is within the given rectangle
- Get images from path
- Apply Affine transformation to src image
- Load images
- Convenience function to constrain a point
- Save the results to file
face-average Key Features
face-average Examples and Code Snippets
Community Discussions
Trending Discussions on face-average
QUESTION
I'm new to Python, therefore having troubles with debugging a script. I'm trying to create an 'average face' using an opencv
script to recreate with my own images. Here's the Github repo I'm using, but same goes for this one and this one.
The land mark detection part works but the average.py
script throws the error I don't understand how to solve.
The first two errors I solved by replacing the xrange()
function with range()
. Than the estimateRigidTransform()
seemed depricated and there for I swapped it with estimateAffinePartial2D()
so far so good.
Now the console throws me the following error:
TypeError: Expected cv::UMat for argument 'M'
This is the scripts' code snippet:
...ANSWER
Answered 2019-Feb-28 at 12:36Instead of using tform = cv2.estimateAffinePartial2D(np.array([inPts]), np.array([outPts]))
and returning tform
, return tform[0]
.
Refer to the documentation for more details.
You will notice that estimateAffinePartial2D
returns retVal
and inliers
. That's why when you are returning tform
, you are getting a TypeError
.
I have also created a PR to fix the code on our LearnOpenCV GitHub repository.
Vishwesh
Edit: You can check the PR here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install face-average
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page