コード例 #1
0
ファイル: CameraCanvas.cpp プロジェクト: jaantti/Firestarter
//Processes the raw data into something that we can display.
void CameraCanvas::processNewData() {
    if(isRGBMode) convert_to_rgb();
    
    working_matrix = convertToCvMatrix();
    overlayObjects();
    overlayText();
    convert_thresh_displayable();
    
    working_threshold = convertThresholdMatrix();    
}
コード例 #2
0
    void frame_generator::generate()
    {
        target_.clear();

        on_generate();

        if (overlayText().length() > 0)
        {
            auto rect = text_.getLocalBounds();
            text_.setPosition(width_ / 2.0f - rect.width / 2.0f,
                              height_ / 2.0f - rect.height / 2.0f);

            target_.draw(text_);
        }

        target_.display();
        image_ = target_.getTexture().copyToImage();
    }