Skip to content

face_loadTrainingData2

facefunctionOpenCV 5.0.0
import { face_loadTrainingData2 } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSfilename, trainlandmarks, trainimages
FUNCTIONface_loadTrainingData2
RETURN TYPEboolean
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

This function extracts the data for training from .txt files which contains the corresponding image name and landmarks. The first file in each file should give the path of the image whose landmarks are being described in the file. Then in the subsequent lines there should be coordinates of the landmarks in the image i.e each line should be of the form x,y where x represents the x coordinate of the landmark and y represents the y coordinate of the landmark.

For reference you can see the files as provided in the <a href="http://www.ifp.illinois.edu/~vuongle2/helen/">HELEN dataset</a>

face_loadTrainingData2(filename: StringVector, trainlandmarks: std__vector_cv__Point2fVector, trainimages: StringVector): boolean;
filename

A vector of type cv::String containing name of the .txt files.

trainlandmarks

A vector of type cv::Point2f that would store shape or landmarks of all images.

trainimages

A vector of type cv::String which stores the name of images whose landmarks are tracked

Returns

A boolean value. It returns true when it reads the data successfully and false otherwise

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.