before ora4
This commit is contained in:
24
ora4/main.cpp
Normal file
24
ora4/main.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "histo.h"
|
||||
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <iostream>
|
||||
|
||||
using namespace cv;
|
||||
|
||||
int main(){
|
||||
Mat img = imread("debrecen_deep.png", IMREAD_GRAYSCALE);
|
||||
imshow("img", img);
|
||||
Histo::showHisto(img);
|
||||
|
||||
double ah, fh;
|
||||
minMaxLoc(img, &ah, &fh);
|
||||
|
||||
Mat dest = (ah == fh) ? img.clone() : (img-ah) * 255 / (fh-ah);
|
||||
|
||||
imshow("dest", dest);
|
||||
Histo::showHisto(dest);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user