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

Filters not applied to CvCamera output.

Open dyarfaradj opened this issue 6 years ago • 3 comments

Hello, I'm trying to develop a lane detection app in React Native and came across this lib. I was playing around with it and got the CvImage to work with gaussian filter, Canny and few others. But when I tried to do this with the CvCamera , output directly from the camera nothing got applied. I could only see raw footage from the camera.
I've tried with gray as input in the Canny as well no results. I tried to follow some examples you made with the CvCameraPreview without any luck.,

Here's the code: <CvInvoke func="Canny" params={{ p1: 'rgba', p2: 'dstMat', p3: 50, p4: 150, }}> <CvCamera style={{ width: '100%', height: '100%', position: 'absolute', }} facing="back" /> </CvInvoke>

Here's the tutorial I'm trying to follow for lane detection https://towardsdatascience.com/finding-driving-lane-line-live-with-opencv-f17c266f15db

dyarfaradj avatar Jan 29 '20 10:01 dyarfaradj

dstMar is only for CvImage try setting p2 to rgba. -- Adam

On Wed, Jan 29, 2020, 2:36 AM dyarfaradj [email protected] wrote:

Hello, I'm trying to develop a lane detection app in React Native and came across this lib. I was playing around with it and got the CvImage to work with gaussian filter, Canny and few others. But when I tried to do this with the CvCamera , output directly from the camera nothing got applied. I could only see raw footage from the camera. I've tried with gray as input in the Canny as well no results. I tried to follow some examples you made with the CvCameraPreview without any luck.,

Here's the code: <CvInvoke func="Canny" params={{ p1: 'rgba', p2: 'dstMat', p3: 50, p4: 150, }}> <CvCamera style={{ width: '100%', height: '100%', position: 'absolute', }} facing="back" /> </CvInvoke>

Here's the tutorial I'm trying to follow for lane detection https://towardsdatascience.com/finding-driving-lane-line-live-with-opencv-f17c266f15db

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adamgf/react-native-opencv3/issues/10?email_source=notifications&email_token=AAJ6V37IZKCJDLYCS65TB63RAFL4VA5CNFSM4KNCJHLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJPWWHA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6V37EUSPCM2R3AUV7BADRAFL4VANCNFSM4KNCJHLA .

adamgf avatar Jan 29 '20 17:01 adamgf

dstMar is only for CvImage try setting p2 to rgba. -- Adam On Wed, Jan 29, 2020, 2:36 AM dyarfaradj @.***> wrote: Hello, I'm trying to develop a lane detection app in React Native and came across this lib. I was playing around with it and got the CvImage to work with gaussian filter, Canny and few others. But when I tried to do this with the CvCamera , output directly from the camera nothing got applied. I could only see raw footage from the camera. I've tried with gray as input in the Canny as well no results. I tried to follow some examples you made with the CvCameraPreview without any luck., Here's the code: <CvInvoke func="Canny" params={{ p1: 'rgba', p2: 'dstMat', p3: 50, p4: 150, }}> <CvCamera style={{ width: '100%', height: '100%', position: 'absolute', }} facing="back" /> </CvInvoke> Here's the tutorial I'm trying to follow for lane detection https://towardsdatascience.com/finding-driving-lane-line-live-with-opencv-f17c266f15db — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#10?email_source=notifications&email_token=AAJ6V37IZKCJDLYCS65TB63RAFL4VA5CNFSM4KNCJHLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJPWWHA>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6V37EUSPCM2R3AUV7BADRAFL4VANCNFSM4KNCJHLA .

Yeah that I'm aware of, as I have understood it p1 is input and p2 is output. So for the Canny, in p1 I have to have rgba so I can get the camera feed, right? Doesn't work. Can you show me how to use CvCamera and add rotate as an example?

dyarfaradj avatar Jan 29 '20 20:01 dyarfaradj

Hi @dyarfaradj something like this should work ->

<CvInvoke func="rotate" params={{ p1: 'rgba', p2: 'rgba', p3: Core.ROTATE_90_COUNTERCLOCKWISE }}> <CvCamera style={{ width: '100%', height: '100%', position: 'absolute', }} facing="back" />

Does that not work? -- Adam

adamgf avatar Feb 08 '20 19:02 adamgf