react-native-opencv3 icon indicating copy to clipboard operation
react-native-opencv3 copied to clipboard

Paint wall

Open sangampandey opened this issue 2 years ago • 3 comments

do one single item I have to play around react-native-opencv3-tests to see how things work in this library.

I have to achieve something like this https://sushanta1991.blogspot.com/2021/09/how-to-paint-wall-using-opencv-in-unity.html but Its very difficult with react-native-opencv3. I am not saying the library doesn't have potential but I have to try 10 things or dig through a lot to find a solution.

Any one faced similar issue and have potential solution?

sangampandey avatar Nov 16 '23 14:11 sangampandey

I also tried this library but it's not very good. So for image processing, we used C++ and vision camera frame processor.

I recommend C++ for better results, crossplatform and performance.

yasintorun avatar Nov 27 '23 14:11 yasintorun

I also tried this library but it's not very good. So for image processing, we used C++ and vision camera frame processor.

I recommend C++ for better results, crossplatform and performance.

How did you build and link opencv with c++ in the frame processor?

therealpurplemana avatar Feb 12 '24 00:02 therealpurplemana

How did you build and link opencv with c++ in the frame processor?

  • I call my C++ code on the React Native side using JSI.
  • I wrote a custom FrameProcessorPlugin to convert frame values to cv::Mat type.
  • In this plugin, I call the init method for the C++ side, which tells me if the image is in the format I want.
  • If everything is ok, I now call the C++ method.

Basicly that look like this;

const process = useFrameProcessor(frame => {
    'worklet';
    const result = opticReaderProcess(frame)
    if (result.ok) {
        const runResult = OpticReaderJsiModule.run(result.mat, options)
        // blabla
    }
})

I'm thinking of opening a repo about it. It can be a guide for those who want to use OpenCV and C++.

yasintorun avatar Feb 12 '24 11:02 yasintorun