Ich schrieb erfolgreich ein Werkzeug, das den Farbraum eines Bildes von linear in sRGB konvertiert, also funktioniert opencv. Dann wollte ich das Bild mit der cv :: resize Funktion neu skalieren, um Thumbnails zu erzeugen. Es hat jedoch nicht funktioniert, hier ist das reproduzierte Code-Snippet.OpenCV resize ist kein Mitglied von cv (OpenCV Basics)
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
// Load images in the C++ format
cv::Mat img = cv::imread("something.jpg");
cv::Mat src = cv::imread("src.jpg");
// Resize src so that is has the same size as img
**cv::resize**(src, src, img.size());
return 0;
}
Ich benutze OpenCV 2.4.8. Was mache ich falsch?
omg ... ok woher weiß ich, welche Funktion ist in welchem Header? – user1767754
wahrscheinlich, [schaut auf die Dokumente] (http://docs.opencv.org/) hilft (Sie sind nach Modulen geordnet, und es gibt 1 Header pro Modul) – berak
Ich hatte bereits die libs und dlls korrekt hinzugefügt, denke ich Ich habe zuvor "opencv2/opencv.hpp" eingeschlossen. Deshalb hatte ich nie Probleme mit Includes. – user1767754