Coder Social home page Coder Social logo

yuvtomat's People

Contributors

maltebucksch avatar nasirky avatar sellmair avatar

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  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  avatar  avatar

yuvtomat's Issues

Yuv.toMat crashed

The toMat throws this:
java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.core.Mat.n_Mat(int, int, int, java.nio.ByteBuffer) (tried Java_org_opencv_core_Mat_n_1Mat and Java_org_opencv_core_Mat_n_1Mat__IIILjava_nio_ByteBuffer_2).
The Image given to the function is an ArImage from google's ARCore.
Any ideas why it happens and how to fix it?
Thank you!

Clip function not found on YuvImage

Thanks for this awesome project (and of course the OpenCV package for gradle)! This really saved me so much trouble. I can convert my images to Mats, but when I try to use the clipping, then for

val yuv = YuvImage(image).clip(left=20, top=20, right=40, bottom=40)

I get a compile error saying

Expression 'YuvImage' of type 'YuvImage.Factory' cannot be invoked as a function. The function 'invoke()' is not found

My versions:

ext.kotlin_version = '1.3.50'
implementation "com.quickbirdstudios:yuvtomat:1.1.0"
implementation 'com.quickbirdstudios:opencv:4.1.0'

Do you have an idea what happens there?

UnsupportedImageFormatException

Yuv format is not supported: Yuv(resource=androidx.camera.core.SettableImageProxy@f251aa8, width=864, height=480, y=Plane(buffer=java.nio.DirectByteBuffer[pos=0 lim=430048 cap=430048], pixelStride=1, rowStride=896), u=Plane(buffer=java.nio.DirectByteBuffer[pos=0 lim=215007 cap=215007], pixelStride=2, rowStride=896), v=Plane(buffer=java.nio.DirectByteBuffer[pos=0 lim=215007 cap=215007], pixelStride=2, rowStride=896))

Hello, can you suggest what is the possible cause for this error?
I noticed strange values width = 864 but rowStride = 896, may be this is the reason.

Sony Xperia XZ3 Black (H9436)

CameraX support

CameraX api has ImageProxy class which you obtain from ImageAnalyzer. It has the same api as usual Image. So adding support is just duplicating several constructors. And I would create pull request, but…
The difficult part, I think, this feature should be in separate package. If someone don't use CameraX in his/her project won't have to download it.

Request bgr method -

Hi,

Can you add "Yuv.bgr" method ?

Because Opencv in android is BGR.

Thank's

private void saveQuickBird(Image newImage, int rotation)
    {
        final Image image = newImage;

        Mat rgbMat = Yuv.rgb(image);// getting a rgb mat!
        Mat bgrMat = new Mat();

        Imgproc.cvtColor(rgbMat, bgrMat, Imgproc.COLOR_RGB2BGR);// Without this line the image is weird.

        // Do some work..

        // Now Save !

        org.opencv.imgcodecs.Imgcodecs.imwrite(_path, bgrRotated);
        
    }

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.