Skip to content

detectMultiScale MAT conversions #186

@kernelgurumeditation

Description

@kernelgurumeditation

Hi,

I'm trying to add eye detection to a simple face detection demo, but I not able take a section from a MAT object.

local faces = face_cascade:detectMultiScale{image=im2, scaleFactor=1.2,minNeighbors=2, flags=2 , minSize={150,150}, maxSize={200,200}}

for i=1,faces.size do
local f = faces.data[i]
local x = f.x/fx
local y = f.y/fx
local w = f.width/fx
local h = f.height/fx

local facegray= im2[f] --- >How to do this in lua????
.....

local eyes = eye_cascade:detectMultiScale{image=facegray, scaleFactor=1.2,minNeighbors=2,flags=2 , minSize={50,50}, maxSize={0,0}}

Any help will be very appreciated

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions