Skip to content
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

improve the remove link area related code in craft_utils.py #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wolfryu
Copy link

@wolfryu wolfryu commented Aug 12, 2020

hi
Thank you for the excellent work and share!!!

I just find that the remove link area process takes a lot of time to process:

segmap[np.logical_and(link_score==1, text_score==0)] = 0 # remove link area

but, if link_threshold is too high to detect character, link_score is full of ZEROs, we do not need to remove line area process.
and, if we do need to remove line area process, we can do it on the area of cv2.connectedComponentsWithStats' stats area, do not have to do it on the full picture.

So, I did some improvment on remove line area related code.
1, if link_threshold is too high and link_score is full of ZEROs, do not do remove link area process.
2, if link_score is not full of ZEROs, do remove link area process on the area of stats[k]

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant