Screen
scalacv.vision.Screen
object Screen
Screen (and screenshot) analysis: finding a known sub-image, and spotting what changed between two captures.
The staple of screen automation and visual testing — "is this button on screen, and where?", "what changed since the last frame?". It is ordinary template matching and differencing, no model involved.
import scalacv.*
OpenCv.load()
for
screen <- Image.read("screenshot.png")
template <- Image.read("button.png")
yield
try Screen.locate(screen, template) // Option[TemplateMatch]
finally { screen.close(); template.close() }
Attributes
- Source
- Screen.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Screen.type
Members list
In this article