ora1, ora2 progress

This commit is contained in:
2025-09-18 16:42:22 +02:00
commit 57380d3b55
16 changed files with 145 additions and 0 deletions

5
ora2/Makefile Normal file
View File

@@ -0,0 +1,5 @@
CFLAGS = `pkg-config --cflags opencv4`
LIBS = `pkg-config --libs opencv4`
% : %.cpp
g++ $(CFLAGS) $(LIBS) -o $@ $<

BIN
ora2/background.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
ora2/background2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
ora2/kurama.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
ora2/main Executable file

Binary file not shown.

25
ora2/main.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
int main(){
Mat img = imread("kurama.jpg", IMREAD_COLOR);
//imshow("kurama", img);
//imshow("k2", img - 100); //fakobb
//imshow("k3", img + 100); //sotetebb
//
Mat d = Scalar(255, 255, 255) - img; //invertalas //bgr formatum
imshow("k", d);
waitKey();
return 0;
}

BIN
ora2/main2 Executable file

Binary file not shown.

39
ora2/main2.cpp Normal file
View File

@@ -0,0 +1,39 @@
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
int main(){
Mat img(400, 600, CV_8UC3);
img.setTo(Scalar(0,0,255));
Rect r(0,0,600, 200);
img(r).setTo(Scalar(0,255,255));
//imshow("img", img);
Mat kurama = imread("kurama.jpg", IMREAD_COLOR);
/*int pad = 50;
Rect r2(pad, pad, kurama.cols - 2 * pad, kurama.rows - 2 * pad);
Mat small = kurama(r2);
imwrite("small_kurama.png", small);*/ //cutting 50px off the pic
resize(kurama, kurama, Size(200, 200));
Rect r3(img.cols/2-100, img.rows/2-100, kurama.cols, kurama.rows);
kurama.copyTo(img(r3)); //copy kurama image over the yellow and red rects
imshow("img2", img);
waitKey();
return 0;
}

BIN
ora2/small_kurama.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB