Convert ofFbo to ofxCvColorImage for blur effect

I’d like to process my drawing pitcture with blur effect.
For the reason, drawing figures in ofFbo and convert ofFbo memory to ofxCvColorImage.
But, drawing ofxCvColorImage cause curious figures.

#include "ofApp.h"

ofFbo buffer;
ofxTrueTypeFontUC font;
ofPixels pixels;
ofImage image;
ofxCvColorImage colorImage;
//--------------------------------------------------------------
void ofApp::setup(){
    ofSetWindowShape(1280, 720);
    ofSetFrameRate(30);
    ofBackground(0, 0, 0);
    font.loadFont("Meiryo.ttf", 48);
    buffer.allocate(800, 800, GL_RGBA);
    colorImage.allocate(800, 800);
    buffer.begin();
    {
        ofBackground(0, 0, 0);
        ofSetColor(255, 255, 255, 255);
        ofCircle(50,50, 50);
        font.drawString("hoge", 200, 200);
    }
    buffer.end();
    buffer.readToPixels(pixels);
    image.setFromPixels(pixels);
}
//--------------------------------------------------------------
void ofApp::update(){}
//--------------------------------------------------------------
void ofApp::draw(){
    colorImage.setFromPixels(image.getPixelsRef());
    colorImage.blurGaussian(5);
    colorImage.draw(0, 0);
}

Seems that colorImage is allocated as RGB and it should be RGBA (OF_IMAGE_COLOR_ALPHA). Else, you could allocate the ofFbo as GL_RGB.

How do I allocate image as RGBA?

ofxCvImage::allocate(int w, int h)

I think allocate method only accept these two arguments(width, height).

Can’t see how either… It might be best to allocate your ofFbo as GL_RGB then.

buffer.allocate(800,800, GL_RGB);

Notice that ofxCvColorImage has a hardcoded iplchannels set to 3. So it’s not possible to use an alpha (fourth) channel on it.

I haven’t use these myself, but it is kind of weird that there isn’t a ofxCvColorAlphaImage or similar…Maybe you can use the ofxCvFloatImage for that.

PS: Consider ofxCv, it’s less constrained as it only wraps OpenCV… might be a bit harder to use though.

I want to try effect for only text simply on an image.
In other words, draw and compose two figures; effected text and non-effected any images.
What methods are effective or easily to implement?