Skip to content

Adaptive threshold produces poor image on Android #194

@rmdvector

Description

@rmdvector

Testing our application that does image capture on a Google Pixel 7.
The code is basically straight out of the examples:
` let pipeline = gm.grayscale(im_mat);

pipeline = gm.adaptiveThreshold(

  pipeline,

  DEFAULT_ADAPTIVE_BOXSIZE_VALUE,    // 5

  DEFAULT_ADAPTIVE_THRESHOLD_VALUE,  // 15

  0 // grayscale channel only

)

const grayScale = gm.tensorFrom(pipeline)

const sess = new gm.Session()

sess.init(pipeline)

sess.runOp(pipeline, 0, grayScale)

sess.destroy()`

On desktop web (Chrome 119.0.6045.123), both our application and the example have the expected results.
However, on the Pixel, the image looks very fuzzy and full of artifacts. I tried the example for your page and saw the same results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions