face_loadTrainingData2
import { face_loadTrainingData2 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;filenameA vector of type cv::String containing name of the .txt files.
trainlandmarksA vector of type cv::Point2f that would store shape or landmarks of all images.
trainimagesA vector of type cv::String which stores the name of images whose landmarks are tracked
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.