* @name start_seam_list * * Initialize a list of seams that match the original number of blobs * present in the starting segmentation. Each of the seams created * by this routine have location information only. */
| 267 | * by this routine have location information only. |
| 268 | */ |
| 269 | void start_seam_list(TWERD* word, GenericVector<SEAM*>* seam_array) { |
| 270 | seam_array->truncate(0); |
| 271 | TPOINT location; |
| 272 | |
| 273 | for (int b = 1; b < word->NumBlobs(); ++b) { |
| 274 | TBOX bbox = word->blobs[b - 1]->bounding_box(); |
| 275 | TBOX nbox = word->blobs[b]->bounding_box(); |
| 276 | location.x = (bbox.right() + nbox.left()) / 2; |
| 277 | location.y = (bbox.bottom() + bbox.top() + nbox.bottom() + nbox.top()) / 4; |
| 278 | seam_array->push_back(new SEAM(0.0f, location)); |
| 279 | } |
| 280 | } |
no test coverage detected