Skip to content

android integration #1

@shyamkumarm

Description

@shyamkumarm

Do you have Java code? got stuck in the below line
val candidateQuadrangles: List[Quadrilateral_F32] = cross(pairs(horizontals), pairs(verticals)).map(xa ⇒ { val ((left: LineParametric2D_F32, right: LineParametric2D_F32), (top: LineParametric2D_F32, bottom:LineParametric2D_F32)) = xa new Quadrilateral_F32( Intersection2D_F32.intersection(left, top, null), Intersection2D_F32.intersection(left, bottom, null), Intersection2D_F32.intersection(right, top, null), Intersection2D_F32.intersection(right, bottom, null)) }).filter((quad: Quadrilateral_F32) ⇒ Intersection2D_F32.contains(imageBounds, quad.a.x, quad.a.y) && Intersection2D_F32.contains(imageBounds, quad.b.x, quad.b.y) && Intersection2D_F32.contains(imageBounds, quad.c.x, quad.c.y) && Intersection2D_F32.contains(imageBounds, quad.d.x, quad.d.y) ) scale(rotate( candidateQuadrangles.maxBy(quad ⇒ { val bounds = new Rectangle2D_F32() UtilPolygons2D_F32.bounding(quad, bounds) val area = quad.area() val squareness = area / bounds.area() assert(squareness >= 0 && squareness <= 1.01) area * Math.pow(squareness, 2) }) ), 1.0f) })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions