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

Function chain_code

deps/tesseract/ccstruct/coutln.h:193–195  ·  view source on GitHub ↗

Return the step as a chain code (0-3) related to the standard feature direction of binary_angle_plus_pi by: chain_code * 64 = feature direction.

Source from the content-addressed store, hash-verified

191 // direction of binary_angle_plus_pi by:
192 // chain_code * 64 = feature direction.
193 int chain_code(int index) const { // index of step
194 return (steps[index / 4] >> (index % 4 * 2)) & STEP_MASK;
195 }
196
197 inT32 area() const; // Returns area of self and 1st level children.
198 inT32 perimeter() const; // Total perimeter of self and 1st level children.

Callers 3

stepFunction · 0.85
ComputeBinaryOffsetsMethod · 0.85
increment_stepMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected