Ionic을 사용하여 이와 유사한 기능을 재현하려고합니다 .
스크린 샷은 현재보고있는 픽셀의 색상을 보여주는 외부 원과 함께 색상을 포착하는 라이브 카메라 미리보기의 내부 원을 보여줍니다.
오버레이로 작동하는 라이브 카메라 미리보기가 있지만 화면의 특정 지점에서 색상을 잡아야 할 곳을 모르겠습니다.
그런 식으로 사진을 찍고 색상을 잡을 수 있다는 것을 알고 있지만 그것이 제가 추구하던 기능이 아니라 실시간으로 결과를 볼 수있는 무언가를 찾고있었습니다.
Can this functionality be achieved? If so, how can I do this?
Can this functionality be achieved? If so, how can I do this?
I faced similar situation in my Application so thought it will be helpful.
I was creating a Cordova-Angular Hybrid app for real time image processing:
Open the front camera and show the different objects in-front of camera.
If object found in the dictionary then display the success message and stop previewing.
Here were the Steps:
Created new Cordova plugin that start the camera in previewMode. For getting the current image of the preview you need to override the onPreviewFrame method.
Get the buffer the image and convert it and Match it.
Based on success/fail call the callBack Method.
Now I think in your case Step-1 will be same with some additional Steps.
Create new Cordova plugin that will start the camera in previewMode. For getting the current image of the preview you need to override the onPreviewFrame method.
Override the onTouchEvent method to calculate the point inside the ImageView and in same time calculate the pixel of the frame inside onPreviewFrame method.
After getting the result just update the view with result.
Also I think the main part in this ionic app is still native.Cordova will just do the bridging.
References:
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다