Add code to remove black part of faceAligned#38
Add code to remove black part of faceAligned#38jae-yong-2 wants to merge 1 commit intoriya-17:masterfrom
Conversation
|
Hi, @riya-17 ! I want you to check my code once. :) |
|
yeah sure @jae-yong-2 give me some time. will try this on weekend. please use the request rewiew option on the right if you want me to review a PR. |
jae-yong-2
left a comment
There was a problem hiding this comment.
This is a description of the code I added.
jae-yong-2
left a comment
There was a problem hiding this comment.
It's my first time doing PR, so please give me good feedback. :)
| "shape_predictor": "C:/Users/ljy89/Desktop/FaceRecognition-master/shape_predictor_68_face_landmarks.dat", | ||
| "image": "C:/Users/ljy89/Desktop/FaceRecognition-master/input_image.jpg", | ||
| "encodings": "C:/Users/ljy89/Desktop/FaceRecognition-master/encodings/encodings.pickle", | ||
| "detection_method": "cnn" |
There was a problem hiding this comment.
changed the address my way. I'll put it back if you want.
There was a problem hiding this comment.
yeah please as it will create confusion for other people
| area=cv2.boundingRect(gray) | ||
| faceAligned = faceAligned[area[1]:area[1] + area[3], area[0]:area[0] + area[2]] | ||
|
|
||
| cv2.rectangle(image, (x, y), (x + w, y + h), (0, 255, 0), 2) |
There was a problem hiding this comment.
FaceAligned Img had an empty space.
I changed it to gray to find the coordinates of the empty space.
cv2.boundingRect() method found maximum minimum coordinates of the colored part.
and Leave only the colored part.
area[1]=> min row area[0]=>min col
area[3]=> max row area[2]=>max col
There was a problem hiding this comment.
There's a 'gray= cv2.cvtColor (faceAligned, cv2.COLOR_BGR2GRAY)' code, right above it.
|
hi @riya-17 Can I get some feedback? If you don't like the issue, please tell me. |
|
Hey @jae-yong-2 I was planning to look into it on weekend.. So will surely look on it tonight or tomorrow.. sorry for delay. |
|
Hey @jae-yong-2 I am facing some errors trying to debug it will update you as soon as possible. |
The black part of the 'faceAligned' img looks bad, so I added a code in FaceRecognizer.py because I wanted to remove it.