2 * psychlops_g_PNG_bridge.cpp
3 * Psychlops Standard Library (Universal)
5 * Last Modified 2006/08/22 by Kenchi HOSOKAWA
6 * (C) 2006- Kenchi HOSOKAWA, Kazushi MARUYA and Takao SATO
11 #include <opencv2/highgui/highgui.hpp>
13 #include "../../../core/ApplicationInterfaces/psychlops_code_exception.h"
14 #include "../../../core/graphic/psychlops_g_image.h"
15 #include "psychlops_g_OPENCV_bridge.h"
19 namespace IMAGE_FORMATS {
22 OPENCV_BRIDGE::OPENCV_BRIDGE() {
24 OPENCV_BRIDGE::~OPENCV_BRIDGE() {
28 void OPENCV_BRIDGE::load(const char *file_name, Image * target) {
\r
29 std::string file(file_name);
\r
30 cv::Mat img = cv::imread(file, -1);
\r
33 void OPENCV_BRIDGE::save(const char *file_name, Image * target) {
\r
34 std::string file(file_name);
\r
37 cv::imwrite(file, img);