MCPcopy Create free account
hub / github.com/creatale/node-dv / NextDirectionChange

Function NextDirectionChange

deps/tesseract/classify/mfoutline.cpp:465–479  ·  view source on GitHub ↗

* This routine returns the next point in the micro-feature * outline that has a direction different than EdgePoint. The * routine assumes that the outline being searched is not a * degenerate outline (i.e. it must have 2 or more edge points). * @param EdgePoint start search from this point * @return Point of next direction change in micro-feature outline. * @note Globals: none * @note Exce

Source from the content-addressed store, hash-verified

463 * @note History: 7/25/89, DSJ, Created.
464 */
465MFOUTLINE NextDirectionChange(MFOUTLINE EdgePoint) {
466 DIRECTION InitialDirection;
467
468 InitialDirection = PointAt (EdgePoint)->Direction;
469
470 MFOUTLINE next_pt = NULL;
471 do {
472 EdgePoint = NextPointAfter(EdgePoint);
473 next_pt = NextPointAfter(EdgePoint);
474 } while (PointAt(EdgePoint)->Direction == InitialDirection &&
475 !PointAt(EdgePoint)->Hidden &&
476 next_pt != NULL && !PointAt(next_pt)->Hidden);
477
478 return (EdgePoint);
479}

Callers 1

MarkDirectionChangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected