As AI technology was growing, mobile App will invoke more AI tech to improve the user experience. Most AI tech based on the cloud, but sometimes we need running AI model in local so the user can get the instant result.
We have a project which customer want to scan the barcode on Mobile, we used Xamarin.Forms. The first choice is ZXing.Net.Mobile, I just install it from the Nuget, it’s very easy to setup and use. But I found that’s very slow for scanning, it hasn’t update for a year. The algorithm was updated, but that Nuget performance just last year level. So, I just build my own Nuget with dev branch, the speed gets better. I go through the source code and found it link the ZXing.Net source code into the project. I feel this is not loose coupling, the ideal is we can update ZXing.net library without installing the new version of ZXing.Net.Mobile.
So, I design a plugins system called CameraPreview. I want to keep the logic for the camera in ZXing.Net.Mobile and we can use a different plugin to analysis the images return from camera preview.
During rebuild the logic, I made some change, like I disable manual focus and manual torch. I used Camera2 API instead of the old Camera API.
So, I just announce CameraPreview was published. It is an open source project
You can use CameraPreview.Plugins.ZXing for scanning barcode
Also, you can build your own plugins for some AI feature like OCR, face detection etc, you can create your own Xamarin.Forms overlay and drawing something based on the scan result, like this
After all, please enjoy this project and feel free to give me feedback and based on this to build your own AI plugins.