-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential_Bug_ACC_CONST #14
Comments
@braca51e, this constant is used to choose whether to apply soft symmetry or not (hard frontalization is performed anyway). Line 94-95 and 97-98 are used just to clip pixels outside of the boundaries (< 0 or > 255), otherwise you might see glitches in the resulting image. |
Thanks @dougsouza, yes that is actually what I saw when I was using an image that was not exceeding the value ACC_CONST. In the else statement you are not doing the clipping and the output is just glitches. However, I do admit the name of the thread is a little bit misleading. |
@braca51e, yes, you are correct. Clipping should performed in both cases, the clipping lines should be placed after if-else statement and before returning both images. A nice way to do clip is to use np.clip(...): np.clip(frontal_raw, 0, 255)
np.clip(frontal_sym, 0, 255) I'll try to fix this later, thanks! |
First I'd like to thank you sharing the code.
I have been reviewing and when I tested a near-frontal image I got a very ugly result. After checking the code I realized that if the occlusion between both sides does not exceed 800 then the returned images are the sames. If the occlusion is bigger than 800 in the if statement, line 93 frontalize.py, there is a check for values bigger than 255 which is not the case for else. Do not if somebody already mentioned it.
Thanks.
The text was updated successfully, but these errors were encountered: