• home
  • About the project
  • Miniature know-how
  • Language
    • Polski
    • English
Mi

Vida

computer vision – computational transgression
Preview: default camera Preview: back camera
Parameters
mirror
prst
Description

Vida is a browser-based (slightly dusted off) version of the algorithms and code used in some of the interactive installations created at the WRO Art Center and as part of its educational activities since approximately 2008 (since the opening of the headquarters at ul. Widok 7). These mechanisms were used in early works presented as part of the Interactive Playground (“Faktury [Janicki/Mastej/Sobolewska], “Painting with Light” [Janicki/Sobolewska]), “Dies Irae” by Serhiy Petljuk, “Stay in Touch” by Maryna Khrypun and Valerie Karpan, etc.

Read more

Vida is a browser-based (slightly dusted off) version of the algorithms and code used in some of the interactive installations created at the WRO Art Center and as part of its educational activities since approximately 2008 (since the opening of the headquarters at ul. Widok 7). These mechanisms were used in early works presented as part of the Interactive Playground (“Faktury [Janicki/Mastej/Sobolewska], “Painting with Light” [Janicki/Sobolewska]), “Dies Irae” by Serhiy Petljuk, “Stay in Touch” by Maryna Khrypun and Valerie Karpan, etc.

Vida incorporates two computer vision (CV) mechanisms: a simple system for detecting motion in designated zones and an algorithm for detecting and tracking moving objects within the camera’s field of view. For some time now, such tasks have typically been entrusted to AI-based systems, but — from a practical perspective — Miniatura’s content can be useful for those designing software designed to run on devices with limited performance. Vida is also suitable for rapid prototyping and educational activities. The source code of Miniatura (especially the “heart” of Miniatura responsible for image processing) was intentionally left unedited and constitutes an interesting monument of “algorithmic literature” — with all its overrides and changes. Vida is therefore a Miniatura with strong instrumental origins — it can be coupled, as a synthetic sense, with other programs or devices, or rebuilt independently.

In the context of considerations on the connections between aesthetics and computational processes, the Hoshen–Kopelman algorithm (more: https://en.wikipedia.org/wiki/Hoshen–Kopelman_algorithm) used in Miniatura for object detection in an image is of great interest. It allows for a transition from a two-dimensional matrix of monochromatic “pixels” to a description in which groups of “pixels” forming separate objects are described by unique (for those objects) indices. This is a simple procedure, but it offers an informative “leap” from mechanical reproduction to the first steps of “understanding” or “interpreting” an image. Understanding the algorithm’s operation can evoke a sense of “computational transgression” — an experience of the “uncanny” resulting from the transition between two methods of perceiving reality.

Technical documentation

Parameters passed via URL

  • famo user | environment (or env); default user; [facingMode] allows forcing the use of the front (user) or rear (environment) camera on devices equipped with dual cameras (most modern mobile devices)
  • worker 0 or 1; default 0; allows blocking the browser’s built-in mechanisms that suspend the program when the window is not visible
  • mirror 0 or 1; default 0; disables/enables mirroring of the camera image (the “mirror” toggle)
  • ws address; disabled by default; enables and sets the address (usually localhost:9001) for WebSocket communication (allows external control of Miniature and customization)
  • xws address; disabled by default; enables and sets the address (usually ws://localhost:9001) with protocol specification for WebSocket communication (allows external control of Miniature and customization)
  • w horizontal camera resolution
  • h vertical camera resolution
  • prst launches Miniature with a parameter set: 0 – motion detection in 3 active zones; 1 – detection of moving objects

Messages passed via WebSocket

Messages to which Miniature responds

  • removezone id [integer greater than or equal to 0] removes the zone with the specified index
  • handlezones 0 or 1; disables or enables handling of active zones
  • handleblobs 0 or 1; disables or enables handling of moving object detection
  • imagefilterfeedback 0.0 … 1.0; feedback level in the background detection system
  • imagefilterthreshold 0.0 … 1.0; motion detector activation threshold
  • zonefillthreshold 0.0 … 1.0; normalized fill level of a zone required for motion detector activation
  • approximateblobpolygons 0 or 1; disables or enables calculation of a rough contour of a moving object
  • addzone id [integer greater than or equal to 0] x [0.0 … 1.0] y [0.0 … 1.0] w [0.0 … 1.0] h [0.0 … 1.0]
  • minblobarea 0.0 … 1.0; minimum normalized area of a moving object
  • maxblobarea 0.0 … 1.0; maximum normalized area of a moving object
  • minblobmass 0.0 … 1.0; minimum normalized virtual mass of a moving object
  • maxblobmass 0.0 … 1.0; maximum normalized virtual mass of a moving object
  • trackblobs 0 or 1 (default 1); disables or enables handling of moving object tracking and maintaining their identifying indices (id) where possible
  • maxblobdist 0.0 … 1.0; maximum normalized distance within which moving objects are treated as a continuation of previous ones
  • approximateblobpolygonspoints > 2; number of points in the simplified outline of a moving object

Messages sent by Miniature

  • “vida” “blobs” i i – number of detected moving objects
  • “vida” “blob” id normMassCenterX normMassCenterY normRectX normRectY normRectW normRectH id – identifier; normMassCenterX, normMassCenterY – position of the object’s mass center; normRectX, normRectY, normRectW, normRectH – coordinates of the rectangle enclosing the object
  • “vida” “zone” id status id – identifier; status – 0 or 1 (zone empty or breached)

MIDI

Messages to which Miniature responds

not applicable

Messages sent by Miniature

not applicable

Communication with MaxMSP

Messages to which Miniature responds

  • removezone id [integer greater than or equal to 0] removes the zone with the specified index
  • handlezones 0 or 1; disables or enables handling of active zones
  • handleblobs 0 or 1; disables or enables handling of moving object detection
  • imagefilterfeedback 0.0 … 1.0; feedback level in the background detection system
  • imagefilterthreshold 0.0 … 1.0; motion detector activation threshold
  • zonefillthreshold 0.0 … 1.0; normalized fill level of a zone required for motion detector activation
  • approximateblobpolygons 0 or 1; disables or enables calculation of a rough contour of a moving object
  • addzone id [integer greater than or equal to 0] x [0.0 … 1.0] y [0.0 … 1.0] w [0.0 … 1.0] h [0.0 … 1.0]
  • minblobarea 0.0 … 1.0; minimum normalized area of a moving object
  • maxblobarea 0.0 … 1.0; maximum normalized area of a moving object
  • minblobmass 0.0 … 1.0; minimum normalized virtual mass of a moving object
  • maxblobmass 0.0 … 1.0; maximum normalized virtual mass of a moving object
  • trackblobs 0 or 1 (default 1); disables or enables handling of moving object tracking and maintaining their identifying indices (id) where possible
  • maxblobdist 0.0 … 1.0; maximum normalized distance within which moving objects are treated as a continuation of previous ones
  • approximateblobpolygonspoints > 2; number of points in the simplified outline of a moving object

Messages sent by Miniature

  • “vida” “blobs” i i – number of detected moving objects
  • “vida” “blob” id normMassCenterX normMassCenterY normRectX normRectY normRectW normRectH id – identifier; normMassCenterX, normMassCenterY – position of the object’s mass center; normRectX, normRectY, normRectW, normRectH – coordinates of the rectangle enclosing the object
  • “vida” “zone” id status id – identifier; status – 0 or 1 (zone empty or breached)
Source code

index.html

sketch.js

gui.js

worker.js

ws.js

p5.vida.js

Cgk8ZGl2IGNsYXNzPSJqcy1tYWlubWVudSI+CgkJPGRpdiBjbGFzcz0ibWVudS1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XBsIG1lbnUtaXRlbSBtZW51LWl0ZW0tdHlwZS1jdXN0b20gbWVudS1pdGVtLW9iamVjdC1jdXN0b20gbWVudS1pdGVtLTk2NSI+PGEgaHJlZj0iaHR0cHM6Ly9taS53cm9jZW50ZXIucGwvcGwvdmlkYS8iPlBvbHNraTwvYT48L2xpPgoJPGxpIGNsYXNzPSJxdHJhbnhzLWxhbmctbWVudS1pdGVtIHF0cmFueHMtbGFuZy1tZW51LWl0ZW0tZW4gbWVudS1pdGVtIG1lbnUtaXRlbS10eXBlLWN1c3RvbSBtZW51LWl0ZW0tb2JqZWN0LWN1c3RvbSBjdXJyZW50LW1lbnUtaXRlbSBtZW51LWl0ZW0tOTY2Ij48YSBocmVmPSJodHRwczovL21pLndyb2NlbnRlci5wbC9lbi92aWRhLyIgYXJpYS1jdXJyZW50PSJwYWdlIj5FbmdsaXNoPC9hPjwvbGk+CjwvdWw+CjwvbGk+CjwvdWw+PC9kaXY+CTwvZGl2PgoJPGJ1dHRvbiBjbGFzcz0ianMtYTExeSI+PGltZyBhbHQ9IkhpZ2ggY29udHJhc3QiIHNyYz0iaHR0cHM6Ly9taS53cm9jZW50ZXIucGwvd3AtY29udGVudC90aGVtZXMvbWkyMDI2L2ltZy9rb250cmFzdC5zdmciPjwvYnV0dG9uPgo=
Vida — Mi
KPO Unia Europejska #NextGenerationEU Rzeczpospolita Polska
WRO ART CENTER
  • About the project
  • Miniature know-how