ALSegmentResult Class Reference

Inherits from NSObject
Declared in ALSegmentResult.h

Overview

The ALSegmentResult provides information of one single segment of a 7-Segment Digit.

  ratioBlackPixel

The ratio of black pixels found in the segment area. The segment area is searched within a surrounding so there is enough redundance for some deviations.

@property (nonatomic, readonly) float ratioBlackPixel

Discussion

Therefore already a small blackRatio of about 15% can indicate an active segment.

Declared In

ALSegmentResult.h

  frame

The frame where the segment is located in the image.

@property (nonatomic, assign) CGRect frame

Declared In

ALSegmentResult.h

  active

The computed status of this segment.

@property (nonatomic, assign) BOOL active

Declared In

ALSegmentResult.h

– initWithRatioBlackPixel:frame:

Initialise a SegmentResult with a black pixel ration and the frame.

- (instancetype)initWithRatioBlackPixel:(float)ratioBlackPixel frame:(CGRect)frame

Parameters

ratioBlackPixel

The ratio of black pixel in this segment.

frame

The frame where the segment is located in the image.

Return Value

A new SegmentResult with black pixel ratio and frame.

Declared In

ALSegmentResult.h