Gabi

Paper Programs

?

Paper

Program

Whaaat?

1st.

2nd.

and so on....

Community

Interact

Learn

Have fun

?

?

?

?

?

?

?

?

So? How does it work?

Hardware components

Context

//transform the X / Y position into pixel position of each calibration point
let knobPoints = [{x: 0, y: 0}, {x: 1, y: 0}, {x: 1, y: 1}, {x: 0, y: 1}].map(mapToKnobPointMatrix);
//results is Region Of Interest
let roi = cv.roi(knobPoints);
//then scan
const knotsPos = [
    0: {x: 0.1722506054577151, y: 0.03212914963821511}
    1: {x: 0.9818725844001396, y: 0.034954314912706196}
    2: {x: 0.9908608620371012, y: 0.9261368735999805}
    3: {x: 0.18352770381014225, y: 0.9009349188435258}
];
const corners = [
    {x: 0, y: 0} //TL
    {x: 1, y: 0} //TR
    {x: 1, y: 1} //BR
    {x: 0, y: 1} //BL
];

Context Points

ROI

//find contours
let contours = cv.findContours(knobToPoints);

//find contour Area
let contourArea = cv.contourArea(contour);

Contour

//segment details in pixel units
{ x, y, width, height }
//find contured segment area
let area = cv.arcLength(area);

/

Segment

Filter Areas

Circularity

Color


const ratio = 4 * cv.CV_PI * area / (perimeter * perimeter);

if (ratio < minCircularity || ratio >= maxCircularity) continue;
if (params.filterByColor) {
    //check color from circle (1, 2, 3)
  if (binImg.ucharAt(Math.round(center.loc.y), Math.round(center.loc.x)) != param.blobColor) {
    continue;
  }
}

Filtered dots

//find contours
let contour = cv.findContours(knobToPoints);

//find contured perimeter area
let area = cv.arcLength(area);

//Details
{ x, y, width, height }

let colorIndex = colorIndexForColor(keyPoint.avgColor, config.colorsRGB);

New dot context

2

3

0

1

Index the position of the color in an matrix based on 7 fields with 4 dimensions < > TL , TR , BL , BR

Detect the vector orientation

Codes based on indexes

Program detected!!! (ID 179)

Program ID and position

Send to Projector

Projection

+

Projection on a paper

Prezentare Gabi

By alexb_90

Prezentare Gabi

1st

  • 519