Unsharp Mask doesn't work?
Unsharp Mask doesn't work?
Good Day, everyone.
I tried to use the fxUnsharpMask effect on my image. But I am not able to see any difference with and without the effect.
Call:
gdStat = m_GdImage.FxUnsharpMask(iGdImgPage, 5, 5, 10);
^- the above values are that bad that you really should see a difference.
After using the FxUnsharpMask function, I set some metadata and save the image as TIF:
gdStat = m_GdImage.SaveAsTIFF(iGdImgPage, str_Name, pDataSource.GdTifCompression);
You can find examples on my FTP-Server: ftp://gdpicture:gd*p1c7@ftp.walternagel ... p_mask.zip
(Files are too big for your upload system)
Please try to reproduce my problem and give me some feedback about how I could get it running. Thanks in advance.
Cheers,
Felix
I tried to use the fxUnsharpMask effect on my image. But I am not able to see any difference with and without the effect.
Call:
gdStat = m_GdImage.FxUnsharpMask(iGdImgPage, 5, 5, 10);
^- the above values are that bad that you really should see a difference.
After using the FxUnsharpMask function, I set some metadata and save the image as TIF:
gdStat = m_GdImage.SaveAsTIFF(iGdImgPage, str_Name, pDataSource.GdTifCompression);
You can find examples on my FTP-Server: ftp://gdpicture:gd*p1c7@ftp.walternagel ... p_mask.zip
(Files are too big for your upload system)
Please try to reproduce my problem and give me some feedback about how I could get it running. Thanks in advance.
Cheers,
Felix
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: Unsharp Mask doesn't work?
Hi,
The reason is simple, your image is too big for those values (dimensions wise). You are basically producing too little amount.
You need to:
1. Slightly increase the radius
2. Extremely increase the amount, probably >400 for your image
3. Reduce the threshold.
You can play with those values to produce the desired amount.
Best,
Sami
The reason is simple, your image is too big for those values (dimensions wise). You are basically producing too little amount.
You need to:
1. Slightly increase the radius
2. Extremely increase the amount, probably >400 for your image
3. Reduce the threshold.
You can play with those values to produce the desired amount.
Best,
Sami
Re: Unsharp Mask doesn't work?
Hi Sami,
unfortunately other values didn't change the result. I tried radius 10, amunt 500 and threshold 5. And I tried radius 20, amount 800 and threshold 3. But the image still looked the same.
To check the values I tried the unsharp mask from GIMP 2.8 on my saved TIF image - result is massive visible. Even with the first values I tried (5, 5, 10).
Do you have another idea? Could it be the order of the functions I call?
FxUnsharpMask -> SetHorizontalResolution -> SetVerticalResolution -> 4x TagSetValueString (TagSoftwareUsed, TagArtist, TagCopyright, TagEquipModel) -> SaveAsTIFF
Best,
Felix
unfortunately other values didn't change the result. I tried radius 10, amunt 500 and threshold 5. And I tried radius 20, amount 800 and threshold 3. But the image still looked the same.
To check the values I tried the unsharp mask from GIMP 2.8 on my saved TIF image - result is massive visible. Even with the first values I tried (5, 5, 10).
Do you have another idea? Could it be the order of the functions I call?
FxUnsharpMask -> SetHorizontalResolution -> SetVerticalResolution -> 4x TagSetValueString (TagSoftwareUsed, TagArtist, TagCopyright, TagEquipModel) -> SaveAsTIFF
Best,
Felix
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: Unsharp Mask doesn't work?
Hi,
I tried the values you talked about (10, 500, 5) with our latest release and I can definitely see a difference. Could you please try it and see.
Best,
Sami
I tried the values you talked about (10, 500, 5) with our latest release and I can definitely see a difference. Could you please try it and see.
Best,
Sami
Re: Unsharp Mask doesn't work?
Dear Sami,
would it be possible to get an example from you where I could see the difference you get?
Best,
Felix
would it be possible to get an example from you where I could see the difference you get?
Best,
Felix
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: Unsharp Mask doesn't work?
Hi,
Here is your image with the parameters you indicated (10, 500, 5). It is jpg just for size matters: The more radius you add, the more sharpening you will get.
Best,
Sami
Here is your image with the parameters you indicated (10, 500, 5). It is jpg just for size matters: The more radius you add, the more sharpening you will get.
Best,
Sami
Re: Unsharp Mask doesn't work?
Thanks, Sami.
I just checked again. And by a fortunate coincidence I had to choose another camera to capture the image.
Result: If I get the image from a Canon EOS 450D the result is more than visible - it is extreme. If I get the image from a Canon EOS 5D Mark II I don't get any results.
Both times the camera captured a RAW file, the eos sdk was used to get the image and after that a gdpicture was created (CreateGdPictureImageFromByteArray). After that the things I posted earlier including the FxUnsharpMask.
Do you have an idea what could cause that? EOS 450D has 12 Million pixel and the 5D Mark II has 21 Million pixel - might that be a problem?
Even with values like 20, 1000, 2 I cannot see a difference on the image from the 5D Mark II.
See example: Best,
Felix
I just checked again. And by a fortunate coincidence I had to choose another camera to capture the image.
Result: If I get the image from a Canon EOS 450D the result is more than visible - it is extreme. If I get the image from a Canon EOS 5D Mark II I don't get any results.
Both times the camera captured a RAW file, the eos sdk was used to get the image and after that a gdpicture was created (CreateGdPictureImageFromByteArray). After that the things I posted earlier including the FxUnsharpMask.
Do you have an idea what could cause that? EOS 450D has 12 Million pixel and the 5D Mark II has 21 Million pixel - might that be a problem?
Even with values like 20, 1000, 2 I cannot see a difference on the image from the 5D Mark II.
See example: Best,
Felix
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: Unsharp Mask doesn't work?
Hi,
I cannot tell without seeing the images. Please do the following:
1. Make sure you have the latest (we have made some internal changes to unsharp mask a short while back).
2. Try again. If the problem persists, check if the methods returns an error.
3. If no error is returned, please do attach the image.
Best,
Sami
I cannot tell without seeing the images. Please do the following:
1. Make sure you have the latest (we have made some internal changes to unsharp mask a short while back).
2. Try again. If the problem persists, check if the methods returns an error.
3. If no error is returned, please do attach the image.
Best,
Sami
Re: Unsharp Mask doesn't work?
Hi,
we are still on it and testing it with different images.
1. We do have the latest version.
2. My colleague just checked again: With an image from the bigger camera (5d mark ii) the function returns "out of memory".
That means: The function works. And it works with "normal" values like 5, 0.5, 40.
we are still on it and testing it with different images.
1. We do have the latest version.
2. My colleague just checked again: With an image from the bigger camera (5d mark ii) the function returns "out of memory".
That means: The function works. And it works with "normal" values like 5, 0.5, 40.
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: Unsharp Mask doesn't work?
Hi,
Im not sure I understand.
If it returns an OutOfMemory Error, please attach the image, the parameters used, and what the version you are using.
Also, please indicate how much RAM you have on your machine, and whether you are running under 64 bits or 32.
Best,
Sami
Im not sure I understand.
If it returns an OutOfMemory Error, please attach the image, the parameters used, and what the version you are using.
Also, please indicate how much RAM you have on your machine, and whether you are running under 64 bits or 32.
Best,
Sami
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest