打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
灵活用Conflunce的里面宏进行代码格式化

现在团队里面大家都在Conflunce的博客里面发表文章,但是对于代码、CSS、各种Script的处理比较丑陋。在这里介绍一种方法给大家。

  1. 点击这个按钮
  2. 选择其他宏
  3. 选择代码块
  4. 根据你的代码风格进行选择
    例如 默认风格

    //! 显示最终生成的车牌图像,便于判断是否成功进行了旋转。
    Mat CPlateLocate::showResultMat(Mat src, Size rect_size, Point2f center, int index)
    {
        Mat img_crop;
        getRectSubPix(src, rect_size, center, img_crop);
        if(m_debug)
        {
            stringstream ss(stringstream::in | stringstream::out);
            ss << "tmp/debug_crop_" << index << ".jpg";
            imwrite(ss.str(), img_crop);
        }
        Mat resultResized;
        resultResized.create(HEIGHT, WIDTH, TYPE);
        resize(img_crop, resultResized, resultResized.size(), 0, 0, INTER_CUBIC);
        if(m_debug)
        {
            stringstream ss(stringstream::in | stringstream::out);
            ss << "tmp/debug_resize_" << index << ".jpg";
            imwrite(ss.str(), resultResized);
        }
        return resultResized;
    }
    //! 显示最终生成的车牌图像,便于判断是否成功进行了旋转。
    Mat CPlateLocate::showResultMat(Mat src, Size rect_size, Point2f center, int index)
    {
        Mat img_crop;
        getRectSubPix(src, rect_size, center, img_crop);
        if(m_debug)
        {
            stringstream ss(stringstream::in | stringstream::out);
            ss << "tmp/debug_crop_" << index << ".jpg";
            imwrite(ss.str(), img_crop);
        }
        Mat resultResized;
        resultResized.create(HEIGHT, WIDTH, TYPE);
        resize(img_crop, resultResized, resultResized.size(), 0, 0, INTER_CUBIC);
        if(m_debug)
        {
            stringstream ss(stringstream::in | stringstream::out);
            ss << "tmp/debug_resize_" << index << ".jpg";
            imwrite(ss.str(), resultResized);
        }
        return resultResized;
    }
    //! 显示最终生成的车牌图像,便于判断是否成功进行了旋转。
    Mat CPlateLocate::showResultMat(Mat src, Size rect_size, Point2f center, int index)
    {
        Mat img_crop;
        getRectSubPix(src, rect_size, center, img_crop);
        if(m_debug)
        {
            stringstream ss(stringstream::in | stringstream::out);
            ss << "tmp/debug_crop_" << index << ".jpg";
            imwrite(ss.str(), img_crop);
        }
        Mat resultResized;
        resultResized.create(HEIGHT, WIDTH, TYPE);
        resize(img_crop, resultResized, resultResized.size(), 0, 0, INTER_CUBIC);
        if(m_debug)
        {
            stringstream ss(stringstream::in | stringstream::out);
            ss << "tmp/debug_resize_" << index << ".jpg";
            imwrite(ss.str(), resultResized);
        }
        return resultResized;
    }


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
tf.image 中间开始切图片,一定大小 tf.image.resize_image_with_crop_or_pad
一次不太成功的项目实战:HOG特征+SVM实现交通标志的检测
LeftImage
图像数据增强——谈谈Opencv
【mxnet速成】mxnet图像分类从模型自定义到测试
OpenCV探索之路(五):图片缩放和图像金字塔
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服