V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
andychen20121130
V2EX  ›  问与答

opencv 小白请教个问题。颜色空间转换花屏

  •  
  •   andychen20121130 · Oct 23, 2018 · 1359 views
    This topic created in 2746 days ago, the information mentioned may be changed or developed.

    //java 传过来的 byte[]转 Mat

    jbyte *buf = env->GetByteArrayElements(bitmap, NULL);
    
    CvMat mat = cvMat(1280, 720, CV_8UC1, buf);
    
    IplImage *image = cvDecodeImage(&mat, CV_LOAD_IMAGE_COLOR);
    
    cv::Mat _mat;
    
    
    if (image) {
    
        _mat = cvarrToMat(image, true);
    
    }
    
    //然后想把 Mat 转 RGBA 转出来花屏。
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2517 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 15:37 · PVG 23:37 · LAX 08:37 · JFK 11:37
    ♥ Do have faith in what you're doing.