Giter VIP home page Giter VIP logo

androidcameraxndkopencv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

androidcameraxndkopencv's Issues

几点建议

  1. YUV数据到RGB的转换可以在Java层通过ScriptIntrinsicYuvToRGB或者ImageAnalysis的setOutputImageFormat(OUTPUT_IMAGE_FORMAT_RGBA_8888)来完成。要简单很多。
  2. 想要相机预览视图不可见,可以在cameraProvider.bindToLifecycle时不传preview参数,在布局中将其设置为invisible好像也行。
  3. 可以直接用ImageView的setImageBitmap作图像分析的显示,没必要自定义View用Canvas绘图。
  4. 图像分析的分辨率也可以通过ImageAnalysis的setTargetResolution方法来完成。
    贵项目代码没有全看,不到之处敬请谅解,欢迎指正!

有个疑问

grayShow方法中,把灰度处理注释掉,直接返回src,也就是说不进行处理,为什么显示的画面不是原图像?而是变成灰色的了?
//根据传入的Byte生成Mat
Mat src = byteArrayToMat(env, bytes, width, height);
//灰度图
//Mat gray;
//cvtColor(src, gray, COLOR_BGRA2GRAY);
//Mat resultMat;
//cvtColor(gray, resultMat, COLOR_GRAY2BGRA);
//转换生成图片的intArray
jintArray result = matToIntArray(env, src);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.