cs-chan / Total-Text-Dataset

Total Text Dataset. It consists of 1555 images with more than 3 different text orientations: Horizontal, Multi-Oriented, and Curved, one of a kind.
BSD 3-Clause "New" or "Revised" License
747 stars 142 forks source link

rules for annotation #9

Closed ran337287 closed 5 years ago

ran337287 commented 5 years ago

I have some question about rules of annotation. As for curved text, why do you assign them different number of coordinates? What's the maximum number?

ckchng commented 5 years ago

Hi,

The annotation was done with the mindset of binding the text regions as tight as possible with the least amount of polygon vertex. Some of the curved texts are more curved than the others hence require more vertex. We didn't keep track of the vertex count, but a simple script could do the trick. Hope that helps, good day!

ran337287 commented 5 years ago

Hi, Thanks very much! I haved test functions ispolycw and poly2cw in matlab, but I am confused by these two function. For example, x=[0, 4, 4, 0], y=[0, 0, 4, 4], these four vertices are in clockwise order and ispolycw returns 0, poly2cw returns [0,4,4,0] [4,4,0,0]; whether x in this function is vertical pixels' coordinates in image? If it is, x in evaluation means the opposite. And change x,y to [4,0,0,4] [4,0,4,0], ispolycw returns 1 poly2cw can not return order correctly.

ckchng commented 5 years ago

Hi there,

As for your first question, where x=[0, 4, 4, 0], y=[0, 0, 4, 4], I don't see a problem with the result that you are getting. It is indeed a counter-clockwise polygon, and poly2cw did change the order for you.

As for your 2nd question, you provided a self-intersecting polygon into poly2cw, which is probably not supported by the function. See this --> http://compgroups.net/comp.soft-sys.matlab/poly2cw-what-happened-to-it/881428.

ran337287 commented 5 years ago

Hi, Thank you very much. so the x, y in ispolycw correspond to height, width respectively in image, that is to mean direction in polycw is opposite to direction in image. As for image, vertices will be reordered to a counter-clockwise squence. By the way, these two squence (clockwise or counter clockwise) will not have any effect on computing area.