Make highgui.hpp independent from C API
This commit is contained in:
@@ -212,11 +212,11 @@ static int select3DBox(const string& windowname, const string& selWinName, const
|
||||
for(;;)
|
||||
{
|
||||
float Z = 0.f;
|
||||
bool dragging = (mouse.buttonState & CV_EVENT_FLAG_LBUTTON) != 0;
|
||||
bool dragging = (mouse.buttonState & EVENT_FLAG_LBUTTON) != 0;
|
||||
int npt = nobjpt;
|
||||
|
||||
if( (mouse.event == CV_EVENT_LBUTTONDOWN ||
|
||||
mouse.event == CV_EVENT_LBUTTONUP ||
|
||||
if( (mouse.event == EVENT_LBUTTONDOWN ||
|
||||
mouse.event == EVENT_LBUTTONUP ||
|
||||
dragging) && nobjpt < 4 )
|
||||
{
|
||||
Point2f m = mouse.pt;
|
||||
@@ -259,9 +259,9 @@ static int select3DBox(const string& windowname, const string& selWinName, const
|
||||
}
|
||||
box[npt] = image2plane(imgpt[npt], R, tvec, cameraMatrix, npt<3 ? 0 : Z);
|
||||
|
||||
if( (npt == 0 && mouse.event == CV_EVENT_LBUTTONDOWN) ||
|
||||
if( (npt == 0 && mouse.event == EVENT_LBUTTONDOWN) ||
|
||||
(npt > 0 && norm(box[npt] - box[npt-1]) > eps &&
|
||||
mouse.event == CV_EVENT_LBUTTONUP) )
|
||||
mouse.event == EVENT_LBUTTONUP) )
|
||||
{
|
||||
nobjpt++;
|
||||
if( nobjpt < 4 )
|
||||
|
Reference in New Issue
Block a user