Unable to fetch base64 string from takePictureAysnc() object

  takePicture = async () => {
    if (this.camera) {
      let photo = await this.camera.takePictureAsync({base64:true});
      console.log("photo taken");
      let tfimage = photo.base64;
      console.log("<<<<<<");
      console.log(photo);
      console.log(tfimage);
      console.log(">>>>>>>>");
      //let tftensor = base64ImageToTensor(tfimage);
      //console.log(tftensor);

    }
  }

I’m unable to log the output of the photo and tfimage. If I remove the base 64 option, I can log the photo object.
here’s a link to the snack - tfjs model - Snack

Hey @mongodude, on what platform(s) and what sdk version(s) is this occurring on?

Cheers,
Adam

Tested it on ios 14 with sdk version - 41.0.0

It was taking too much time to calculate base64 string for my image. Once I reduced the size, it is working fine.

Wonder whether there is some timeout for displaying the logs to the console, even after waiting for 15 minutes, I could see no output on the console.

Makes it difficult to debug.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.