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

question in function get_text_placement_mask(xyz,mask,plane,pad=2,viz=False): #50

Closed
CatherineYao opened this issue Jun 9, 2017 · 1 comment

Comments

@CatherineYao
Copy link

In synthgen.py, I know that pts is points of contour in 2d image and pts_fp is where these points should be in fronto-parallel. But what does pts_tmp mean?
rect = cv2.minAreaRect(pts_fp[0].copy().astype('float32'))
box = np.array(cv2.cv.BoxPoints(rect))
R2d = su.unrotate2d(box.copy())
box = np.vstack([box,box[0,:]]) #close the box for visualization

mu = np.median(pts_fp[0],axis=0)
pts_tmp = (pts_fp[0]-mu[None,:]).dot(R2d.T) + mu[None,:]
boxR = (box-mu[None,:]).dot(R2d.T) + mu[None,:]
s = rescale_frontoparallel(pts_tmp,boxR,pts[0])

Why does these codes necessary ? Why pts_fp and box cant't use in function “rescale_frontoparallel " directlly but use pts_tmp and boxR?

@CatherineYao
Copy link
Author

I got it.

@CatherineYao CatherineYao changed the title detail question in function get_text_placement_mask(xyz,mask,plane,pad=2,viz=False): question in function get_text_placement_mask(xyz,mask,plane,pad=2,viz=False): Jun 9, 2017
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

No branches or pull requests

2 participants