John Cupitt
John Cupitt
Hi @idc9, openslide reads as RGBA by default, though the A is unused. You'll need to read as 4-byte pixels, then (probably?) drop the A in numpy. Alternatively, if you...
You can make flips and rotates at the same time, which can be useful, eg.: ```python #!/usr/bin/python3 # makes 12,512 patches in 0.5s from CMU-1-Small-region.svs import sys import pyvips def...
> I would like use the rgb argument however I get an error You probably have an old libvips. The `rgb` option was only added a few years ago.
Sorry, no, there's nothing like that.
Hi @Rasaa84, sure, there are lots of speedup tricks. 1. For tissue / background classification, I would test a low-res pyramid level, perhaps using a simple threshold, then use that...
It depends, I'd experiment. You could try generating all mask tiles, testing for != 0, and only generating those image tiles? That'd be simple. If you want offline tile generation...
Hi @alexmv, this has been reported before, but I've not got around to investigating properly. We might be able to just add a 0.5 somewhere to improve rounding, or it...
I think I found the problem -- it's centre vs. corner sampling. If you change this 0.5 to 0.0, this issue goes away: https://github.com/libvips/libvips/blob/master/libvips/resample/resize.c#L240-L246 ie. `resize` is using corner sampling...
Hmm it seems that fix only works for integer upscaling factors -- fractional scales need a slightly different tweak. I'll this about this a little more.
Hello, there's some sample code here: https://github.com/libvips/pyvips/blob/master/examples/progress.py You can monitor save progress and kill computation.