Skip to content

Commit 8277545

Browse files
janherlingmeta-codesync[bot]
authored andcommitted
Fixed the documentation in HarrisCornerDetector
Summary: Several value ranges were off. Reviewed By: enpe Differential Revision: D87603272 Privacy Context Container: L1192943 fbshipit-source-id: 1fc297796e238068775449a17d39bf351cb5c09f
1 parent 033f31f commit 8277545

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

impl/ocean/cv/detector/HarrisCornerDetector.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
7878
/**
7979
* Creates a new object.
8080
* @param frame The 8 bit frame on which the Harris corners are detected, must be valid
81-
* @param width The width of the given frame in pixel, with range [7, infinity)
81+
* @param width The width of the given frame in pixel, with range [10, infinity)
8282
* @param height The height of the given frame in pixel, with range [7, infinity)
8383
* @param framePaddingElements The number of padding elements at the end of each frame row, in elements, with range [0, infinity)
8484
*/
@@ -101,7 +101,7 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
101101
/// The frame in which the Harris corners are detected.
102102
const uint8_t* const frameData_;
103103

104-
/// The frame width in pixel, with range [7, infinity)
104+
/// The frame width in pixel, with range [10, infinity)
105105
const unsigned int frameWidth_;
106106

107107
/// The frame height in pixel, with range [7, infinity)
@@ -164,8 +164,8 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
164164
* Detects Harris corners inside a sub-region of a given frame.
165165
* If the given frame is not an 8 bit grayscale frame with pixel origin in the upper left corner, the frame will be converted internally.
166166
* @param frame The frame to be used for corner detection, with resolution [10, infinity)x[7, infinity), must be valid
167-
* @param subFrameLeft Left position of the sub frame defined in the original image in pixel, with range [0, frame.width() - 7]
168-
* @param subFrameTop Top position of the sub frame defined in the original image in pixel, with range [0, frame.height() - 7]
167+
* @param subFrameLeft Left position of the sub frame defined in the original image in pixel, with range [0, frame.width() - subFrameWidth]
168+
* @param subFrameTop Top position of the sub frame defined in the original image in pixel, with range [0, frame.height() - subFrameHeight]
169169
* @param subFrameWidth Width of the sub frame in pixel, with range [10, frame.width() - subFrameLeft]
170170
* @param subFrameHeight Height of the sub frame in pixel, with range [7, frame.height() - subFrameTop]
171171
* @param threshold Minimal strength value all detected corners must exceed to count as corner, with range [0, 512]
@@ -194,8 +194,8 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
194194
/**
195195
* Creates the Harris corner votes for the horizontal and vertical sobel responses for an entire frame (and therefore for each pixel of the original frame) without applying a maximum suppression.
196196
* The resulting votes may have an invalid 2 pixel wide frame border (depending on 'setBorderPixels').
197-
* @param sobelResponse 16 bit sobel filter responses (8 bit for the horizontal response and 8 bit for the vertical response) to be used for Harris application, with minimal size 5x5
198-
* @param width The width of the original frame in pixel, with range [5, infinity)
197+
* @param sobelResponse 16 bit sobel filter responses (8 bit for the horizontal response and 8 bit for the vertical response) to be used for Harris application, with minimal size 10x5
198+
* @param width The width of the original frame in pixel, with range [10, infinity)
199199
* @param height The height of the original frame in pixel, with range [5, infinity)
200200
* @param sobelResponsePaddingElements The number of padding elements at the end of each sobel response row, in elements, with range [0, infinity)
201201
* @param votes Resulting Harris votes values, make sure that the buffer is large enough
@@ -207,9 +207,9 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
207207

208208
/**
209209
* Calculates the Harris corner votes for several given positions in a frame only.
210-
* @param yFrame The 8 bit (grayscale) frame to be used for Harris application, with minimal size 5x5
210+
* @param yFrame The 8 bit (grayscale) frame to be used for Harris application, with minimal size 10x5
211211
* @param width The width of the given frame in pixel, with range [10, infinity)
212-
* @param height The height of the given frame in pixel, with range [7, infinity)
212+
* @param height The height of the given frame in pixel, with range [5, infinity)
213213
* @param yFramePaddingElements The number of padding elements at the end of each frame row, in elements, with range [0, infinity)
214214
* @param positions Pixel positions inside the given frame to determine the responses for
215215
* @param numberPositions Number of given pixel positions
@@ -232,7 +232,7 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
232232
/**
233233
* Calculates the Harris corner vote for one specific sub-pixel position from an 8 bit grayscale frame.
234234
* @param yFrame The 8 bit grayscale frame that is used to determine the vote, must be valid
235-
* @param width The width of the given frame in pixel, with range [10, infinity)
235+
* @param width The width of the given frame in pixel, with range [7, infinity)
236236
* @param x Horizontal position in pixel, with range [3, width - 3)
237237
* @param y Vertical position in pixel, with range [3, height - 3)
238238
* @param yFramePaddingElements The number of padding elements at the end of each frame row, in elements, with range [0, infinity)
@@ -243,7 +243,7 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
243243
/**
244244
* Calculates the Harris corner votes for specified sub-pixel positions from an 8 bit grayscale frame.
245245
* @param yFrame The 8 bit grayscale frame that is used to determine the vote
246-
* @param width The width of the given frame in pixel, with range [10, infinity)
246+
* @param width The width of the given frame in pixel, with range [7, infinity)
247247
* @param positions The sub-pixel positions for which the Harris votes will be determined
248248
* @param yFramePaddingElements The number of padding elements at the end of each frame row, in elements, with range [0, infinity)
249249
* @param worker Optional worker object to distribute the computation
@@ -325,7 +325,7 @@ class OCEAN_CV_DETECTOR_EXPORT HarrisCornerDetector
325325
/**
326326
* Creates the Harris corner votes for a subset of specified sub-pixel positions from an 8 bit grayscale frame.
327327
* @param yFrame The 8 bit grayscale frame that is used to determine the vote
328-
* @param width The width of the given frame in pixel, with range [10, infinity)
328+
* @param width The width of the given frame in pixel, with range [7, infinity)
329329
* @param yFramePaddingElements The number of padding elements at the end of each frame row, in elements, with range [0, infinity)
330330
* @param positions The sub-pixel positions for which the Harris votes will be determined
331331
* @param votes The resulting votes, one vote for each position
@@ -391,7 +391,7 @@ inline HarrisCornerDetector::PreciseCornerPosition::PreciseCornerPosition(const
391391
framePaddingElements_(framePaddingElements)
392392
{
393393
ocean_assert(frameData_ != nullptr);
394-
ocean_assert(frameWidth_ >= 7u && frameHeight_ >= 7u);
394+
ocean_assert(frameWidth_ >= 10u && frameHeight_ >= 7u);
395395
}
396396

397397
inline bool HarrisCornerDetector::detectCorners(const uint8_t* yFrame, const unsigned int width, const unsigned int height, const unsigned int yFramePaddingElements, const unsigned int threshold, const bool frameIsUndistorted, HarrisCorners& corners, const bool determineExactPosition, Worker* worker)

0 commit comments

Comments
 (0)