Report how many segments the scan produced when a match is refused
A run reported "10 pair(s) of lines cross but do not end at the crossing" over and over. Ten pairs implies five segments, which is a very different scene from two, and the message did not say which. A scan fragmenting into a dozen short pieces and a scan holding only the two far walls print the same line today, yet they need opposite adjustments: min_split_dist and min_line_length for the first, a different place to stand for the second. Every refusal now ends with the segment count, and Detection carries it so a caller can act on it rather than parse a string.
This commit is contained in:
@@ -165,6 +165,10 @@ struct Detection
|
||||
/// Số ứng viên vượt hết mọi cổng. > 1 nghĩa là trong tầm có nhiều hình giống nhau.
|
||||
std::size_t candidate_count = 0;
|
||||
|
||||
/// Số đoạn thẳng trích được từ scan. Nhiều bất thường = cảnh đang bị vụn, chỉnh trích đoạn;
|
||||
/// ít quá = đứng sai chỗ hoặc mục tiêu ngoài tầm. Hai ca khác hẳn nhau.
|
||||
std::size_t segment_count = 0;
|
||||
|
||||
/// Vì sao không nhận, khi `valid == false`. Một câu người đọc hiểu được, không phải mã lỗi.
|
||||
std::string reason;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user