Skip to content

Commit 8a094a5

Browse files
adishavitalalek
authored andcommitted
Merge pull request opencv#9445 from adishavit:master
* Adds cv::resizeWindow() overload taking a single cv::Size argument. * Replaces copied documentaion with Doxygen @overload command.
1 parent bee5cb5 commit 8a094a5

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

modules/highgui/include/opencv2/highgui.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,12 @@ CV_EXPORTS_W void imshow(const String& winname, InputArray mat);
401401
*/
402402
CV_EXPORTS_W void resizeWindow(const String& winname, int width, int height);
403403

404+
/** @overload
405+
@param winname Window name.
406+
@param size The new window size.
407+
*/
408+
CV_EXPORTS_W void resizeWindow(const String& winname, const cv::Size& size);
409+
404410
/** @brief Moves window to the specified position
405411
406412
@param winname Name of the window.

modules/highgui/src/window.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ void cv::resizeWindow( const String& winname, int width, int height )
190190
cvResizeWindow( winname.c_str(), width, height );
191191
}
192192

193+
void cv::resizeWindow(const String& winname, const cv::Size& size)
194+
{
195+
CV_TRACE_FUNCTION();
196+
cvResizeWindow(winname.c_str(), size.width, size.height);
197+
}
198+
193199
void cv::moveWindow( const String& winname, int x, int y )
194200
{
195201
CV_TRACE_FUNCTION();

samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int main(int argc, char **argv)
155155
Mat frame;
156156
video_in >> frame;
157157
namedWindow(video_name, WINDOW_NORMAL);
158-
cv::resizeWindow(video_name, frame.cols, frame.rows);
158+
cv::resizeWindow(video_name, frame.size());
159159

160160
cout << "Please select a bounding box, and press any key to continue." << endl;
161161
vector<Point2f> bb;

0 commit comments

Comments
 (0)