Package: gimp
Version: 2.8.16-1
Severity: minor

Dear maintainer,

The automatic threshold computation is available in Colors > Threshold
and then "auto" button.

When applied on an image already binarized (with all pixels either black
or white) it computes a threshold of 0, thus making all the pixels
white.

It seems that this feature use the Otsu's method to determine the
threshold. This method determine two peaks in the histogram and separate
them.

I'm not sure I understand completely Otsu's thresholding algorithm, but
I think the implementation only lacks a "+1" on the choosen threshold.
It seems to me that the code returns the last value that should be black
while the actual binarization code takes the threshold as the first
value to be white. Thus a "+1" should be the only thing needed.

Moreover the current code doesn't seem to be able to return a value 255.
So it should be all good.


Best regards,
Celelibi

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.10.11 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages gimp depends on:
ii  gimp-data            2.8.16-1
ii  libaa1               1.4p5-44
ii  libatk1.0-0          2.18.0-1
ii  libbabl-0.1-0        0.1.14-1
ii  libbz2-1.0           1.0.6-8
ii  libc6                2.21-6
ii  libcairo2            1.14.4-1
ii  libdbus-1-3          1.10.6-1
ii  libdbus-glib-1-2     0.102-1
ii  libexif12            0.6.21-2
ii  libexpat1            2.1.0-7
ii  libfontconfig1       2.11.0-6.3
ii  libfreetype6         2.6.1-0.1
ii  libgdk-pixbuf2.0-0   2.32.3-1
ii  libgegl-0.3-0        0.3.4-1
ii  libgimp2.0           2.8.16-1
ii  libglib2.0-0         2.46.2-3
ii  libgs9               9.16~dfsg-2
ii  libgtk2.0-0          2.24.29-1
ii  libgudev-1.0-0       230-2
ii  libice6              2:1.0.9-1+b1
ii  libjasper1           1.900.1-debian1-2.4
ii  libjpeg62-turbo      1:1.4.1-2
ii  libjson-glib-1.0-0   1.0.4-2
ii  liblcms2-2           2.6-3+b3
ii  libmng1              1.0.10+dfsg-3.1+b3
ii  libpango-1.0-0       1.38.1-1
ii  libpangocairo-1.0-0  1.38.1-1
ii  libpangoft2-1.0-0    1.38.1-1
ii  libpng12-0           1.2.54-1
ii  libpoppler-glib8     0.38.0-2
ii  librsvg2-2           2.40.11-2
ii  libsm6               2:1.2.2-1+b1
ii  libtiff5             4.0.6-1
ii  libwmf0.2-7          0.2.8.4-10.4
ii  libx11-6             2:1.6.3-1
ii  libxcursor1          1:1.1.14-1+b1
ii  libxext6             2:1.3.3-1
ii  libxfixes3           1:5.0.1-2+b2
ii  libxmu6              2:1.1.2-2
ii  libxpm4              1:3.5.11-1+b1
ii  libxt6               1:1.1.5-1
ii  python-gtk2          2.24.0-4
ii  python2.7            2.7.11-2
pn  python:any           <none>
ii  zlib1g               1:1.2.8.dfsg-2+b1

Versions of packages gimp recommends:
ii  ghostscript  9.16~dfsg-2

Versions of packages gimp suggests:
pn  gimp-data-extras          <none>
pn  gimp-help-en | gimp-help  <none>
pn  gvfs-backends             <none>
ii  libasound2                1.0.29-1

-- no debconf information

Reply via email to