Minor Downsampling bug? [Aperio svs images]

Derek Magee D.R.Magee at leeds.ac.uk
Mon Jan 11 07:52:36 EST 2016


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:

[cid:image001.png at 01D14C6D.97172E00]

(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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20160111/fcd38150/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 139984 bytes
Desc: image001.png
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20160111/fcd38150/attachment-0001.png>


More information about the openslide-users mailing list