Preprocessing RAW images for Scantailor

Share your software workflow. Write up your tips and tricks on how to scan, digitize, OCR, and bind ebooks.

Moderator: peterZ

royeven
Posts: 19
Joined: 27 Nov 2012, 19:43
E-book readers owned: ipad
Number of books owned: 0
Country: Norway

Re: Preprocessing RAW images for Scantailor

Post by royeven »

pablitoclavito wrote:All worked OK leaving those options out! Thanks!
Glad it worked for you too.
pablitoclavito wrote:Test B
https://mega.co.nz/#!u1pkjKbY!PK9mFR0-R ... owIs69_gkI

In the photo in the middle there is something wrong but the corrected grid is perfect.
Obviously because that area receives more light, although we can't see perfectly in the photo at first. This uneven light is something I have to improve, but with my basic setup, that's the area that receives more light...

Code: Select all

No color correction will be done
Preparing images for ppmunwarp
calibration.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.829MB 0.760u 0:00.779
calibration.JPG=>calibration.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.250u 0:00.560
IMG_2497.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.099MB 0.540u 0:00.690
IMG_2497.JPG=>IMG_2497.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.260u 0:00.359
IMG_2498.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.149MB 0.540u 0:00.580
IMG_2498.JPG=>IMG_2498.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.240u 0:00.689
IMG_2499.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.112MB 0.540u 0:00.599
IMG_2499.JPG=>IMG_2499.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.230u 0:00.420
IMG_2500.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.151MB 0.530u 0:00.649
IMG_2500.JPG=>IMG_2500.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.260u 0:00.539
IMG_2501.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.179MB 0.540u 0:00.679
IMG_2501.JPG=>IMG_2501.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.340u 0:00.429
IMG_2502.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.054MB 0.540u 0:00.609
IMG_2502.JPG=>IMG_2502.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.260u 0:00.410

Calculating calibration data from image: calibration.ppm
Number of detected points: 1568
Only 1548 detected points used for calibration!
Average: 82.769399, calculated from 1508 of 1512 data points. PPI: 420
Deskewed picture size: 3642 x 3062   (79.06% x 88.65%)

Correcting geometry.  This will take some time...

Calculating calibration data from image: calibration_corrected.ppm

(gimp:2698): Gimp-Widgets-CRITICAL **: gimp_device_info_set_device: assertion `(info->device == NULL && GDK_IS_DEVICE (device)) || (GDK_IS_DEVICE (info->device) && device == NULL)' failed
Number of detected points: 1564
Only 1548 detected points used for calibration!
Average: 82.767497, calculated from 1512 of 1512 data points. PPI: 420
Deskewed picture size: 3641 x 3061   (99.98% x 100.00%)
Calculated PPI is: 420
Is this correct? If not, insert corrected value now. If correct, leave empty and press enter

** (gimp:2698): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/null.png,
borders don't fit within the image

** (gimp:2698): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_horizontal.png,
borders don't fit within the image

** (gimp:2698): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/null.png,
borders don't fit within the image

** (gimp:2698): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_vertical.png,
borders don't fit within the image

** (gimp:2698): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_vertical-sel.png,
borders don't fit within the image

** (gimp:2698): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_horizontal-sel.png,
borders don't fit within the image

PPI is set to: 420
ImageMagick will now convert the format into one useable by Scantailor
calibration_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.260u 0:00.329
calibration_corrected.ppm=>calibration_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 17.26MB 0.930u 0:01.179
check_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.310u 0:00.429
check_corrected.ppm=>check_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 3.592MB 0.490u 0:00.699
IMG_2497_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.340u 0:00.449
IMG_2497_corrected.ppm=>IMG_2497_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.77MB 0.820u 0:01.050
IMG_2498_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.500
IMG_2498_corrected.ppm=>IMG_2498_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.89MB 0.830u 0:01.049
IMG_2499_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.500
IMG_2499_corrected.ppm=>IMG_2499_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.91MB 0.860u 0:00.990
IMG_2500_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.280u 0:00.530
IMG_2500_corrected.ppm=>IMG_2500_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.88MB 0.830u 0:00.960
IMG_2501_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.290u 0:00.530
IMG_2501_corrected.ppm=>IMG_2501_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 13.06MB 0.850u 0:00.969
IMG_2502_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.290u 0:00.500
IMG_2502_corrected.ppm=>IMG_2502_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.48MB 0.850u 0:00.969
I don't know what those gimp errors are, but the final photos were OK.
This could potentially be a serious bug. Do you still have your test set for this one? And could you send it to me? What happens here is that gimp tries to open the descewed calibration.ppm file, but fails to do so. Do you remember whether you could manually inspect this file and measure the PPI manually or whether you accepted the calculated value of PPI without measuring? Does the same thing happens if you repeat the process on the same files?
pablitoclavito
Posts: 39
Joined: 12 Sep 2012, 16:54
E-book readers owned: Iliad
Number of books owned: 200
Country: Spain

Re: Preprocessing RAW images for Scantailor

Post by pablitoclavito »

royeven wrote: This could potentially be a serious bug. Do you still have your test set for this one? And could you send it to me?
Check your PM
royeven wrote: What happens here is that gimp tries to open the descewed calibration.ppm file, but fails to do so. Do you remember whether you could manually inspect this file and measure the PPI manually or whether you accepted the calculated value of PPI without measuring?
I don't remember, sorry.
royeven wrote: Does the same thing happens if you repeat the process on the same files?
I am going to repeat this test again now.
UPDATE: Done, and no errors now :?:
Maybe at that time I hade gimp already opened with a previous photo, or a previous calibration photo that I was checking after finishing the other test? (just guessing)

Code: Select all

No color correction will be done
Preparing images for ppmunwarp
calibration.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.829MB 0.690u 0:00.719
calibration.JPG=>calibration.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.280u 0:00.370
IMG_2497.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.099MB 0.460u 0:00.500
IMG_2497.JPG=>IMG_2497.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.250u 0:00.509
IMG_2498.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.149MB 0.450u 0:00.490
IMG_2498.JPG=>IMG_2498.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.270u 0:00.509
IMG_2499.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.112MB 0.450u 0:00.490
IMG_2499.JPG=>IMG_2499.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.280u 0:00.509
IMG_2500.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.151MB 0.450u 0:00.480
IMG_2500.JPG=>IMG_2500.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.340u 0:00.629
IMG_2501.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.179MB 0.490u 0:00.519
IMG_2501.JPG=>IMG_2501.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.230u 0:00.589
IMG_2502.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.054MB 0.450u 0:00.500
IMG_2502.JPG=>IMG_2502.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.220u 0:00.459

Calculating calibration data from image: calibration.ppm
Number of detected points: 1568
Only 1548 detected points used for calibration!
Average: 82.769399, calculated from 1508 of 1512 data points. PPI: 420
Deskewed picture size: 3642 x 3062   (79.06% x 88.65%)

Correcting geometry.  This will take some time...

Calculating calibration data from image: calibration_corrected.ppm
Number of detected points: 1564
Only 1548 detected points used for calibration!
Average: 82.767497, calculated from 1512 of 1512 data points. PPI: 420
Deskewed picture size: 3641 x 3061   (99.98% x 100.00%)
Calculated PPI is: 420
Is this correct? If not, insert corrected value now. If correct, leave empty and press enter

PPI is set to: 420
ImageMagick will now convert the format into one useable by Scantailor
calibration_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.220u 0:00.250
calibration_corrected.ppm=>calibration_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 17.26MB 0.970u 0:01.289
check_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.290u 0:00.379
check_corrected.ppm=>check_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 3.592MB 0.470u 0:00.760
IMG_2497_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.270u 0:00.410
IMG_2497_corrected.ppm=>IMG_2497_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.77MB 0.830u 0:01.099
IMG_2498_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.270u 0:00.500
IMG_2498_corrected.ppm=>IMG_2498_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.89MB 0.840u 0:00.939
IMG_2499_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.669
IMG_2499_corrected.ppm=>IMG_2499_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.91MB 0.840u 0:00.960
IMG_2500_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.640
IMG_2500_corrected.ppm=>IMG_2500_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.88MB 0.820u 0:00.929
IMG_2501_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.290u 0:00.660
IMG_2501_corrected.ppm=>IMG_2501_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 13.06MB 0.840u 0:00.949
IMG_2502_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.489
IMG_2502_corrected.ppm=>IMG_2502_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.48MB 0.830u 0:00.929
The size of the corrected final photos are exactly the same in the test that went "wrong" and the test I have done now.
They seem the same visually.

Thanks
royeven
Posts: 19
Joined: 27 Nov 2012, 19:43
E-book readers owned: ipad
Number of books owned: 0
Country: Norway

Re: Preprocessing RAW images for Scantailor

Post by royeven »

pablitoclavito wrote: The size of the corrected final photos are exactly the same in the test that went "wrong" and the test I have done now.
They seem the same visually.

Thanks
That's because the error you got was from gimp trying to open the descewed calibration file, not from ppmunwarp descewing your files. I.e., the part of the code that generated output files didn't fail, only gimp.

Looking at the code, I think I have found the problem:

Code: Select all

##Uncomment this line to visually inspect and measure DPI in GIMP
gimp "$CALIBRATION_IMAGE$CORRECTED_POSTFIX.$OUTPUT_FORMAT" &

##Calculating PPI in software
echo -e "\nCalculating calibration data from image: $CALIBRATION_IMAGE$CORRECTED_POSTFIX.$OUTPUT_FORMAT"
PPI=$(( (ppmunwarp $UNWARP_OPT -m "$CONTROL_PPI.$OUTPUT_FORMAT" "$CALIBRATION_IMAGE$CORRECTED_POSTFIX.$OUTPUT_FORMAT") 1>/dev/null ) 2>&1)
echo "$PPI"
PPI=`echo "$PPI" | grep -o "Average: [0-9\.]*, calculated from [0-9]* of [0-9]* data points. PPI: [0-9]*" | sed -r 's/.*PPI: ([0-9]*).*/\1/g'`
echo "Calculated PPI is: $PPI"
echo "Is this correct? If not, insert corrected value now. If correct, leave empty and press enter"
read PPI_CORRECTED
if [ "$PPI_CORRECTED" != "" ]
then
	PPI=$PPI_CORRECTED
fi
echo "PPI is set to: $PPI"
Gimp tries to open the file in the background, but at the same time, ppmunwarp is accessing the very same file. This could potentially cause problems and is a very unpredictable situation. Usually the operating system will negotiate this with each process and usually this should work. But it would be safer to change this part of the script to something like this:

Code: Select all

##Calculating PPI in software
echo -e "\nCalculating calibration data from image: $CALIBRATION_IMAGE$CORRECTED_POSTFIX.$OUTPUT_FORMAT"
PPI=$(( (ppmunwarp $UNWARP_OPT -m "$CONTROL_PPI.$OUTPUT_FORMAT" "$CALIBRATION_IMAGE$CORRECTED_POSTFIX.$OUTPUT_FORMAT") 1>/dev/null ) 2>&1)
echo "$PPI"

##Uncomment this line to visually inspect and measure DPI in GIMP
gimp "$CALIBRATION_IMAGE$CORRECTED_POSTFIX.$OUTPUT_FORMAT" &

PPI=`echo "$PPI" | grep -o "Average: [0-9\.]*, calculated from [0-9]* of [0-9]* data points. PPI: [0-9]*" | sed -r 's/.*PPI: ([0-9]*).*/\1/g'`
echo "Calculated PPI is: $PPI"
echo "Is this correct? If not, insert corrected value now. If correct, leave empty and press enter"
read PPI_CORRECTED
if [ "$PPI_CORRECTED" != "" ]
then
	PPI=$PPI_CORRECTED
fi
echo "PPI is set to: $PPI"
Here ppmunwarp finishes working before gimp tries to access the calibration file. I looked at the test set you sent me, and I wasn't able to reproduce the error (and from your update I take it that you weren't either), so we might never know what caused the error in your original testB, but it wouldn't hurt to update the bash script to the above, just to be on the safe side. Thanks for posting your log file, and please continue to post any errors you get. This way we can get the best result possible
pablitoclavito
Posts: 39
Joined: 12 Sep 2012, 16:54
E-book readers owned: Iliad
Number of books owned: 200
Country: Spain

Re: Preprocessing RAW images for Scantailor

Post by pablitoclavito »

OK, I will update the script then.

As soon as I have a new book to scan entirely, I will probably take several calibration photos so I can test it again extensively.
Thanks.
royeven
Posts: 19
Joined: 27 Nov 2012, 19:43
E-book readers owned: ipad
Number of books owned: 0
Country: Norway

Re: Preprocessing RAW images for Scantailor

Post by royeven »

Warning: the following post is discussing fine tuning of ppmunwarp and is aimed for those able to read c++
abmartin wrote:I tested the new autodetection with about a dozen examples. It seems to be right on. Always within 1 ppi of what I manually did, which of course isn't as accurate as the average approach.
If you look in the file ppmunwarp.cpp you will find a method that reads through the grid of calibration points, and detecting the distance (in pixles) between them by using the pythagorean theorem. The problems by doing this is that if you "miss" a point, there will be a gap in the grid, and the calculated distances in these cases will be the double (or more) of the true distance between points, which will give a falsely high PPI, even when calculating a mean value.

Code: Select all

  // Calculating average number of pixels between points horizontally
  for (int i = 1; i < this->n; i++){
    dx = this->x[i] - this->x[i-1];
    dy = this->y[i] - this->y[i-1];
    if(dx >= 0){
      dist=sqrt(pow(dx,2) + pow(dy,2));
      total += dist;
      num++;
    }
  }
  //Print("Average: %Lf, data set: %Lf\n",total/num,num);
I therefore make the same calculation one more time, but with a different approach:

Code: Select all

  long double new_total = 0;
  long double new_num = 0;
  // Calculating average number of pixels between points horizontally from points within 5 percent of total average
  for (int i = 1; i < this->n; i++){
    dx = this->x[i] - this->x[i-1];
    dy = this->y[i] - this->y[i-1];
    if(dx >= 0){
      dist=sqrt(pow(dx,2) + pow(dy,2));
      if(abs(total/num - dist) <= (total/num * 0.05)){
        new_total += dist;
        new_num++;
      }
    }
  }
  double PPI = new_total/new_num;
In the next part of the code, I again use the pythagorean theorem, but this time I ignore all points that that is more than 5% off of the previous calculated mean value. This means that even if there are holes in the the grid, these distances (which are falsely high) will not be used when calculating the PPI. In the line

Code: Select all

if(abs(total/num - dist) <= (total/num * 0.05)){
, 0.05 is the five percent limit I have set for ignoring a calibration point.

What this means is that the averaging approach isn't at all a precise one. If there are missing calibration points in your grid, the average will be higher than it need be. Some of these falsely large distances will be ignored by the 5% off limit, but if you detect that the calculated value is always off by 1 PPI, you could try to fine tune this 5% limit to see whether it affects your PPI.

However I think I must say that 1 PPI off isn't the worst error margin I have heard of. If we take into calculations that we multiply the distance between calibration points with 5.08, it is necessary to determine the coordinates of the mean distance between calibration points down to an accuracy of at least 0.2 pixles. In my opinion, it's not worth it, but I would love to hear from someone experienced in mathematics and programming on alternative approaches
pablitoclavito
Posts: 39
Joined: 12 Sep 2012, 16:54
E-book readers owned: Iliad
Number of books owned: 200
Country: Spain

Re: Preprocessing RAW images for Scantailor

Post by pablitoclavito »

NEW UPDATE:
Same problem occurred again! :shock:

This is the script I used
https://mega.co.nz/#!zwokGI7Z!UcG_8VVOV ... TGAknMLK34

Code: Select all

No color correction will be done
Preparing images for ppmunwarp
calibration.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.829MB 0.630u 0:00.660
calibration.JPG=>calibration.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.260u 0:00.300
IMG_2497.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.099MB 0.500u 0:00.500
IMG_2497.JPG=>IMG_2497.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.270u 0:00.450
IMG_2498.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.149MB 0.490u 0:00.500
IMG_2498.JPG=>IMG_2498.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.250u 0:00.780
IMG_2499.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.112MB 0.490u 0:00.519
IMG_2499.JPG=>IMG_2499.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.270u 0:00.300
IMG_2500.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.151MB 0.500u 0:00.500
IMG_2500.JPG=>IMG_2500.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.330u 0:00.589
IMG_2501.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.179MB 0.500u 0:00.520
IMG_2501.JPG=>IMG_2501.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.260u 0:00.399
IMG_2502.JPG JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 3.054MB 0.500u 0:00.629
IMG_2502.JPG=>IMG_2502.ppm JPEG 4608x3456 4608x3456+0+0 8-bit DirectClass 47.78MB 0.260u 0:00.560

Calculating calibration data from image: calibration.ppm
Number of detected points: 1568
Only 1548 detected points used for calibration!
Average: 82.769399, calculated from 1508 of 1512 data points. PPI: 420
Deskewed picture size: 3642 x 3062   (79.06% x 88.65%)

Correcting geometry.  This will take some time...

Calculating calibration data from image: calibration_corrected.ppm
Number of detected points: 1564
Only 1548 detected points used for calibration!
Average: 82.767497, calculated from 1512 of 1512 data points. PPI: 420
Deskewed picture size: 3641 x 3061   (99.98% x 100.00%)
Calculated PPI is: 420
Is this correct? If not, insert corrected value now. If correct, leave empty and press enter
<<<<<<<<<<<<<<<<<<<<< IT GOES DIRECTLY TO SHOWING THE NEXT MESSAGES. IT DOESN'T WAIT FOR ME TO PRESS ENTER OR ANYTHING
(gimp:6172): Gimp-Widgets-CRITICAL **: gimp_device_info_set_device: assertion `(info->device == NULL && GDK_IS_DEVICE (device)) || (GDK_IS_DEVICE (info->device) && device == NULL)' failed

** (gimp:6172): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/null.png,
borders don't fit within the image

** (gimp:6172): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_vertical.png,
borders don't fit within the image

** (gimp:6172): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/null.png,
borders don't fit within the image

** (gimp:6172): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_horizontal.png,
borders don't fit within the image

** (gimp:6172): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_horizontal-sel.png,
borders don't fit within the image
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<THE CURSOR STAYED HERE, BUT I COULDN DO ANYTHING I JUST PRESSED ENTER (GIMP HAD OPENED AND LET ME MEASURE THOUGH)
PPI is set to: 420
ImageMagick will now convert the format into one useable by Scantailor
calibration_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.240u 0:00.280
calibration_corrected.ppm=>calibration_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 17.26MB 0.950u 0:01.199
check_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.330u 0:00.469
check_corrected.ppm=>check_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 3.592MB 0.510u 0:00.800
IMG_2497_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.290u 0:00.409
IMG_2497_corrected.ppm=>IMG_2497_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.77MB 0.860u 0:01.200
IMG_2498_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.439
IMG_2498_corrected.ppm=>IMG_2498_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.89MB 0.840u 0:01.030
IMG_2499_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.570
IMG_2499_corrected.ppm=>IMG_2499_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.91MB 0.850u 0:01.210
IMG_2500_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.290u 0:00.380
IMG_2500_corrected.ppm=>IMG_2500_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.88MB 0.830u 0:01.149
IMG_2501_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.300u 0:00.400
IMG_2501_corrected.ppm=>IMG_2501_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 13.06MB 0.830u 0:01.009
IMG_2502_corrected.ppm PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 33.48MB 0.310u 0:00.589
IMG_2502_corrected.ppm=>IMG_2502_corrected.tif PPM 3643x3063 3643x3063+0+0 8-bit DirectClass 12.48MB 0.820u 0:01.010
I think I prefer you upload the whole modified file (.sh , not the code) because maybe I am doing it wrong.
Thanks.
royeven
Posts: 19
Joined: 27 Nov 2012, 19:43
E-book readers owned: ipad
Number of books owned: 0
Country: Norway

Re: Preprocessing RAW images for Scantailor

Post by royeven »

Your script is correctly modified according to my suggestions, so it's not the script that is in error. The problem is that gimp is not able to read the descewed file, which in my opinion is very strange since ppmunwarp was able to read it without errors. Could you send me your files for this one as well, including your version of ppmunwarp and your script? What happens if you abort the process when it goes wrong and try it again?

Which version of linux, and which version of gimp do you use? I'm starting to believe this is a bug in gimp and not related to ppmunwarp. How many MB ram is allocated to your virtual machine?
pablitoclavito
Posts: 39
Joined: 12 Sep 2012, 16:54
E-book readers owned: Iliad
Number of books owned: 200
Country: Spain

Re: Preprocessing RAW images for Scantailor

Post by pablitoclavito »

Gimp 2.8.2

lubuntu-12.10-desktop-i386

1024 MB Virtual memory

The files: these are the same photos as before, the ones I sent you before in rar.

ppmunwarp: I used the one you posted in page 1 of this thread.
I upload here what I have in lubuntu

https://mega.co.nz/#!KkgBjajZ!OXM3ZXL0o ... JTJkfd06Fc

The script: The one you have just checked and said it was ok
https://mega.co.nz/#!zwokGI7Z!UcG_8VVOV ... TGAknMLK34 (just in case of doubt)

How can I abort the process?
royeven
Posts: 19
Joined: 27 Nov 2012, 19:43
E-book readers owned: ipad
Number of books owned: 0
Country: Norway

Re: Preprocessing RAW images for Scantailor

Post by royeven »

The more I think about this, the more certain I get that this is related to your version of gimp/linux, and not to ppmunwarp. I suggest we continue this discussion via private email since it won't be relevant to this topic.

The error message from "Gimp-Widgets-CRITICAL" and all complaints about "Invalid borders specified for theme pixmap" indicates that this is about the themes and widgets your lubuntu installation uses

I'm using ubuntu 12.04 with gimp 2.6.12 and I can't reproduce your error. I'll send you a PM soon, and we'll take it from there
pablitoclavito
Posts: 39
Joined: 12 Sep 2012, 16:54
E-book readers owned: Iliad
Number of books owned: 200
Country: Spain

Re: Preprocessing RAW images for Scantailor

Post by pablitoclavito »

OK, I agree.

Thanks.
Post Reply