neko-classifier / preprocess.h
ongkn's picture
fix README and move repo from Codeberg to HF
d9b23b8 unverified
#pragma once
#include <opencv2/core/hal/interface.h>
#include <opencv2/core/mat.hpp>
#include <opencv2/core/types.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/objdetect.hpp>
#include <cstddef>
#include <filesystem>
#include <iostream>
#include <string>
#include <vector>
class preprocessor
{
public:
// vars
std::vector<cv::Mat> animeNekoGirls;
std::vector<cv::Mat> nonAnimeNekoGirls;
// methods
void loadImg();
void resizeImg(int size=256); //to 256x256 atm
void normalizeImg(); //not doing norm anymore since the result is fucked up; no idea how to fix atm
void convertToGrayscaleImg(); //'cause no colors equals less computational resources required
void blurImg(int blurType, int kerx, int kery); //0 for gaussian, 1 for ...
void detectEdgesImg(int algType, int thr1, int thr2); //0 for canny, 1 for ...
void detectContours();
void harrisImg(); //apply the Harris detection algo to our two classes
void SIFTimg(); //I don't think this one will help us much
bool boolDetectHuman();
void imwriteToDiskImg();
};