It is currently Thu Mar 28, 2024 12:06 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: odd upscale diffusion results
PostPosted: Sat Jan 31, 2015 8:47 pm  (#1) 
Offline
GimpChat Member

Joined: Dec 05, 2014
Posts: 14
Hi,

I'm currently working on a restoration project of a large scanned poster. The scan is 16817 x 9596 pixels in size. To figure out the best way to restore the scan I took a smaller crop from the scan and worked on it since it's much faster then working on the full size scan. Once I figured out what steps I need to do I started applying those steps to the full size scan. One of the steps is to use the 'Upscale [diffusion]' at it's default setting. When I apply the filter to the cropped test section this is what I get:

Image

Results look good for what I want. Here's what the preview from g'mic in gimp shows me on the full size scan:

Image

Again, looks good for what I want so I click 'Ok' and wait for the filter to finish running. But here's the same area after the filter has run on the full size scan:

Image

The end result has a ghosting effect which isn't shown in the preview on or the cropped section that was upscaled. I'm running the filter in exactly the same manner with the same settings. Any ideas on what might be happening?

Thanks,
Kevin


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Sat Jan 31, 2015 9:40 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
This may have something to do with G'MIC's preview window. Try it without re sizing the preview image area.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Sun Feb 01, 2015 11:48 am  (#3) 
Offline
GimpChat Member

Joined: Dec 05, 2014
Posts: 14
I tried starting gimp fresh, loading the starting image, going into g'mic and only selecting the filter - didn't resize the window, change the preview, or change the default settings. Still produces the ghosting on the full size image.

I've narrowed the problem down to the input image size. The vertical dimension I've been keeping the same and only changing the horizontal dimension. The amount of ghosting and the placement of the ghost image changes based upon the starting horizontal dimension. The 16,384 x 9,596 sized start image matches the output from the preview:

Image


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Sun Feb 01, 2015 1:01 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Oct 10, 2014
Posts: 60
Hi kevin360 G mic not my strong point but you could adjust sharpness button sliding it to right from 50 to 70 or more? also could adjust smoothness button to right if sharpness adjustment doesn't help.


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Sun Feb 01, 2015 1:20 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Try changing the canvas size to a square match ie 16,384 x 16,384. NOT the image size just the canvas size.Then center the layer/layers. Run G'MIC.

If that works you could then just crop to your image.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Tue Feb 03, 2015 9:33 am  (#6) 
Offline
GimpChat Member

Joined: Dec 05, 2014
Posts: 14
Doing that worked, but only for the cropped image that was 16,384 x 9,596. I tried increasing the canvas size for the full size scan and got the same ghost.

I did a test on the full size image to increase it's size 300% using the diffusion upscale and the result is just a black image. Tried also with the upscale scale2x filter upscaling 3x, same result, completely black image. It's looking like there's some bug when the image is very large in size. I'll do some more tests and post a bug report to sourceforge about it.


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Tue Feb 03, 2015 12:25 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Are you running a 64 bit system?

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Tue Feb 03, 2015 2:09 pm  (#8) 
Offline
GimpChat Member

Joined: Dec 05, 2014
Posts: 14
Hi Rod,

Yes it's a 64-bit system, I'm running slackware 14.1 with linux kernel 3.18.4. The machine is a Dell T5500 workstation, dual Xeon processors with 72 GB of main memory and 240 GB of swap space, so address space shouldn't be an issue. I'm also doing these tests running gimp/gmic as root so there shouldn't be any user limits affecting me.

I did another test, I just created an image that's 16817x9596 in size, white on one side, black on the other. Here's a scaled down version so you can see what it looks like:

Image

I then ran upscale diffusion at 200% (default settings) on this image and zoomed into the transition between white and black (note: red arrows added by me obviously!):

Image

Notice the ghosting line, what's interesting is that it has a color to it. It's not a gray, it's a bluish color. So I did the same thing to the starting image with the upscale scale2x filter:

Image

It shows even more colors being added to the transition area. This could be completely normal to the algorithm but it just seems a little odd since there's only black and white that are being upscaled.


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Tue Feb 03, 2015 2:32 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Hi Kevin,
This looks like a bug indeed.
Anyway, I've created the same kind of image as you, tried the filter Upscale [diffusion] on it, with default settings, and I don't observe the blue line artifacts.
Same with a regular image, I don't get any ghosting artifacts. I'm using version 1.6.0.4_beta of the G'MIC plug-in.
That's very annoying, I can't reproduce the bug easily.


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Tue Feb 03, 2015 9:32 pm  (#10) 
Offline
GimpChat Member

Joined: Dec 05, 2014
Posts: 14
Hi Ronounours,

So the starting image you tested was 16817 x 9596 in size?

I was running 1.6.0.3 so I downloaded and installed 1.6.0.4 beta and I'm still getting the same results.

Tried some more testing, found that I could cause the discoloration with an image that's 10763 x 6142 in size. This time I just made a black circle, did a threshold to make sure I only had black or white pixels:

Image

Upscaling that image using the default settings I'm getting blue, red, and green haloing - it all depends upon which section of the circle I zoom in on:

Image
Image
Image
Image

Does this filter or the upscale scale2x filter use all g'mic code or are there some parts that are run by third-party libraries? I'm wondering if maybe it's a bug in a library that's causing the problem and that would explain why you don't have the issue and I do.

Thanks for looking into the issue for me,
Kevin


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Tue Feb 03, 2015 11:27 pm  (#11) 
Offline
GimpChat Member

Joined: Dec 05, 2014
Posts: 14
Just tried the circle image with the upscale scale2x filter. I get similar results, red and blue halos. But mostly on vertical line areas, horizontal line areas it doesn't show up:

Image

Image

This happens if the colorbase is YCbCr, if I switch to RGB or LAB, then it comes out looking fine, no color bands just black and white pixels.


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Wed Feb 04, 2015 3:30 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Thanks for these precisions Kevin.
I need to try that, but I can't do this right now as I need a lot of memory, which is something I have only on my PC at the lab.
I'll try this afternoon.

So far, with smaller images (like 512x512) I don't observe any of these issues.


Top
 Post subject: Re: odd upscale diffusion results
PostPosted: Wed Feb 04, 2015 1:43 pm  (#13) 
Offline
GimpChat Member

Joined: Dec 05, 2014
Posts: 14
I did a test on a 512 x 512 image where the left side is white and the right side is black. Upscaled it 200% using diffusion. When I zoom into the transition area there is a gradient between the white and black area, but the steps between white and black aren't grey, they have a slight color to them. I did a screen capture so you can see:

http://youtu.be/AsjHKAgoQ6I

Would this be something normal or should the gradient at the transition area be only grey values (R=G=B)?

If there are any tests I can run for you or files you need just let me know. Thanks again


Top
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Psychedelic manips using G'MIC Diffusion Tensors

1

No new posts Attachment(s) New Fake Paintings (Show of results)

40

No new posts Attachment(s) Default vs. Legacy: "Subtract" Layer Mode: Different results

8

No new posts Attachment(s) Results of my "photo to cartoon" plugin

99



* Login  



Powered by phpBB3 © phpBB Group