Add highlighted target region for dissecting images.

master
sigonasr2 1 year ago
parent f659e3267b
commit 67cf8515a8
  1. 22
      OpenCVVideoParser/main.cpp
  2. BIN
      OpenCVVideoParser/samples/clearscreen.png
  3. BIN
      OpenCVVideoParser/samples/scorescreen.png
  4. BIN
      OpenCVVideoParser/samples/songend.png
  5. BIN
      OpenCVVideoParser/samples/songselect.png
  6. BIN
      OpenCVVideoParser/samples/songstart.png
  7. BIN
      OpenCVVideoParser/samples/stagepopup.png

@ -86,7 +86,10 @@ public:
}
}
}
vf2d upperLeft={-1,-1};
vf2d lowerRight={-1,-1};
bool cabDetected=false;
bool dragging=false;
bool OnUserUpdate(float fElapsedTime) override
{
// Called once per frame, draws random coloured pixels
@ -98,6 +101,23 @@ public:
frameView-=fElapsedTime*60;
UpdateScreen();
}
if(!cabDetected){
DrawString({4,ScreenHeight()-40},"Drag over the region where the cab's screen is located.\n (Make sure the entire cabinet screen is covered)",WHITE,2);
SetPixelMode(Pixel::ALPHA);
FillRectDecal(upperLeft,lowerRight-upperLeft,{255,255,255,128});
}
if(GetMouse(Mouse::LEFT).bPressed){
if(!dragging){
upperLeft=GetMousePos();
dragging=true;
}
}
if(GetMouse(Mouse::LEFT).bHeld){
lowerRight=GetMousePos();
}
if(GetMouse(Mouse::LEFT).bReleased){
dragging=false;
}
return true;
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Loading…
Cancel
Save