OF Results are something strange when convert to ofImage

Hi, All.

I made Co-Saliency map OF version from this code:

But results are something strange when convert cv::Mat to ofImage

original opencv code’s imshow() results are


What’s wrong to me?

my code is here :

#include “ofApp.h”

using namespace cv;
using namespace ofxCv;

// prototype----------------------------------------------------
void PQFT(cv::Mat &pre_img, cv::Mat &next_img, cv::Mat &saliency_map);

//--------------------------------------------------------------
void ofApp::setup(){

aa.load("/Users/mun/Desktop/aa.png");
mm= toCv(aa);
bb.load("/Users/mun/Desktop/bb.png");
nn= toCv(bb);

PQFT(mm, nn, ll);

//cv::imwrite("/Users/mun/Desktop/test.png", ll);
toOf(ll, cc);

}

//--------------------------------------------------------------
void ofApp::update(){

}

//--------------------------------------------------------------
void ofApp::draw(){

ofSetColor(255);
aa.draw(0,0, 512, 512);
cc.draw(512,0, 512, 512);

}

Thanks.
Best,
@bemoregt.

The Co-Saliency map is a kind of machine vision methods.

for finding defects using two images which are reference and target.

The PQFT is a 2d FFT transform for color image using Quaternion complex numbers.

The Quaternion using in not only 3d graphics but also image processing.

@bemoregt.