1

I need to create an android app doing mainly two things.

1) Detect price and barcode

2) Creating AR content around the detected price/barcode

For the detection part, I use google mobile-vision and for the AR part I use ARcore. The problem I have is that Arcore doesnt allow auto focus so I dont have a good enough resolution to read the prices or bar codes.

So I was wondering if there was a standard way to do text recognition and AR in the same app.

Thank you.

Jerome Kelly
  • 151
  • 1
  • 10

2 Answers2

0

I haven't used ARcore, but have done a reasonable amount of detection. This was mostly done using a surface view extension showing and initialising a camera1 api view with detection interface and callbacks.

It is difficult to tell what might be going wrong without any code available or how you have gone about this, any chance you could provide some?

0

You can implement them in the same app, on different activities. if you are using the mobile vision API. you can set the start the intent for detection with startActivityForResult and when the result is returned. you can Implement a transistion in the onActivityResult part. Since the AR depends on the detected data you can pass the information to the AR activity using putExtra. use this as a template

 fab.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent i = new Intent(DetectActivity.this, ScanActivity.class);
                    startActivityForResult(i, REQUEST_CODE);

                }
            });

     @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
                if (data != null) {

                    final Barcode barcode = data.getParcelableExtra("barcode");
                    String rslt=barcode.displayValue;

Intent intent =new Intent(DetectActivity.this, ArActivity.class);
                    intent.putExtra("link", rslt);
                    startActivity(intent);
                    finish();

Hope this helps, ScanActivity is the normal Camera View SurfaceView activity that mobile vision uses

petyr
  • 415
  • 7
  • 15