Minor Downsampling bug? [Aperio svs images]

Adam Goode adam at spicenitz.org
Mon Jan 11 10:17:27 EST 2016


This is worth filing as an issue at
https://github.com/openslide/openslide/issues/new.

It's a documentation issue, at least. But I suspect there is a subtle bug
in OpenSlide that is causing this.


Adam

On Mon, Jan 11, 2016 at 7:52 AM, Derek Magee via openslide-users <
openslide-users at lists.andrew.cmu.edu> wrote:

> I think I’ve just discovered a minor (but quite annoying, if you are doing
> image analysis) bug in OpenSlide. When you request two overlapping
> sub-regions of arbitrary offet using openslide_read_region() the values
> you get back are similar at the same global location, but can differ by (it
> seems) up to 1 value in each channel. While you can’t tell the difference
> looking at the image, this can be annoying when doing image analysis on
> overlapping tiles. I’ve observed this at a non-native downsample level (I
> can’t tell if it occurs at level 0).
>
>
>
> An example (level 1 is a downsample by a factor of 4):
>
>
>
> openslide_read_region() 13200,9360,840,360,1
>
>
>
> openslide_read_region() 14160,8400,840,840,1
>
>
>
> I wrote a little matlab script to visualise the pixel differences in the
> overlapping area. The visualisation is below:
>
>
>
>
>
> (while this looks bad, the range is scaled, and the max difference in any
> colour channel is actually +/-3, and it’s hard to find examples where it is
> greater than +/-1).
>
>
>
> I then implemented a workaround that creates an arbitrary sub-image by
> loading appropriate 240x240 blocks on a regular grid and copying these over
> to a new image. This solves the issue and every pixel is now identical.
> Obviously this is at the cost of extra calls to openslide_read_region().
>
>
>
> If anyone is using openslide for image analysis it is worth bearing this
> in mind as I spent a good few hours trying to debug my image analysis
> routines which were failing only rarely (due to this inconsistency), before
> realising there was no bug and it was the pixel values going in that were
> different.
>
>
>
> Derek
>
>
>
> _______________________________________________
> openslide-users mailing list
> openslide-users at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20160111/ed8bb73c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 139984 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20160111/ed8bb73c/attachment-0001.png>


More information about the openslide-users mailing list