Jump to content

FFT / IFFT Effect


Recommended Posts

Download: https://forums.getpaint.net/topic/32337-argusmagnus-plugin-pack-20181019/

(Copy the file "ArgusPDN.FFTEffects.dll" to the "paint.net/Effects" folder)

 

 

This Plugin contains 4 effects related to Fast Fourier Transform and Signal Processing in the Frequency Domain:

 

1. Transform->Fast Fourier Transform: Transforms either intensity image or one of the channels (R,G,B ) to and from the frequency domain. The transformed image contains the magnitude information in the R and G values and the phase information in the B value (which basically means: don't change the B value of any pixel too much are at all if you want to get a meaningful result when transforming back).

If you want to get a meaninful result when transforming back, there are two limitations: 1. Don’t change the B component (the phase information is important), 2. Non-rectangular Selections won’t work.

 

2. Signal Processing->Low Pass Filter: The same as using the transform effect, removing (setting to black or transparent) all pixel outside a rectangle around the center and transforming back only this is faster, more accurate (less information is lost) and easier to control

 

3. Signal Processing->High Pass Filter: The same as using the transform effect, removing all pixels inside a rectangle around the center and transforming back (again, faster, more accurate, easier controlled)

 

5. Signal Processing->Band Pass Filter: Combination of Low and High Pass Filter.

 

Example: FFT

lw59GV.png

 

Example images (high pass filtered, adjusted and blended together):

09sGip.pngJKzh9N.png

 

 

The plugin actually uses the FFTW library (fftw.org), I have not written the transformation code myself (mainly for performance reasons)

Edited by ArgusMagnus
Added links to zipped DLL of Null54's updated version
  • Upvote 1

My batch Image Processor: https://imagenator.codeplex.com

Link to comment
Share on other sites

  • 2 years later...
On 8/25/2015 at 6:02 AM, ArgusMagnus said:

Copy the files "ArgusPaintNet.FTT.dll" and "ArgusPaintNet.Shared.dll" and the folder "NativeBinaries" to the "paint.net/Effects" folder

 

Did you do this??

 

Are you using the Windows Store version? The locations are slightly different see https://www.getpaint.net/doc/latest/InstallPlugins.html#4

Link to comment
Share on other sites

On 8/24/2015 at 11:32 PM, ArgusMagnus said:

"NativeBinaries" to the "paint.net/Effects" folder

 

I messed that part. I took x64 DLL from x64 folder & deleted all other dll and folder and from from native Binaries. After putting dll in X64 folder in NativeBinaries. Now it is working fine. I placed DLL.

Edited by Pratyush

Rl7un0O.png

Link to comment
Share on other sites

  • 7 months later...

Just a heads up, this plugin will not work in the upcoming Paint.NET v4.1 update. (see here: https://forums.getpaint.net/topic/113153-paintnet-41-beta-build-6808/?do=findComment&comment=548571 )

 

 

The reason is the use of PointInt32 which has been renamed to Point2Int32. I'm also planning on moving that type, and others (e.g. RectInt32), into a different namespace. So, I'd advise against using it for now.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 2 weeks later...

I recompiled the plugin for Paint.NET 4.1.1 using the source code @ArgusMagnus posted.

 

Changes:

  • Added a replacement PointInt32 structure to ArgusPaintNet.FFT.

FFT.zip

Source.zip

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

On 9/18/2018 at 2:08 PM, null54 said:

I recompiled the plugin for Paint.NET 4.1.1 using the source code @ArgusMagnus posted.

 

Added to the first post. Thanks @null54!

Link to comment
Share on other sites

  • 2 months later...

Every time I try to use the effects it gives me this error message:

Quote

File: C:\Users\User\Downloads\paint.net latest\paint.net latest\Effects\ArgusPaintNet.FFT.dll
      Name: ArgusPaintNet.FFT.BandPassFilterEffect
      Version: 1.0.0.0
      Author: Argus Magnus
      Copyright: Copyright © ArgusMagnus 2015
      Website: http://forums.getpaint.net/index.php?/topic/32205-fft-ifft-effect/
      Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.EntryPointNotFoundException: Unable to find an entry point named 'fftw_alloc_complex' in DLL 'libfftw3-3.dll'.
   at ArgusPaintNet.FFT.FFTWInterop.FFTW.fftw_alloc_complex(Int32 size)
   at ArgusPaintNet.FFT.FFTWInterop.FFTW.GetTwoWayPlan(Int32 width, Int32 height)
   at ArgusPaintNet.FFT.BandPassFilterEffect.OnRenderCore(Rectangle[] renderRects, Int32 startIndex, Int32 length)
   at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) in D:\src\pdn\src\Effects\Effect`1.cs:line 99
   at PaintDotNet.Effects.BackgroundEffectRenderer.RenderWithClipMask(Effect effect, EffectConfigToken token, RenderArgs dstArgs, RenderArgs srcArgs, RectInt32[] rois, IRenderer`1 clipMaskRenderer) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 196
   at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.RenderTile(EffectConfigToken token, Int32 tileIndex) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 175
   at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.RenderNextTile(EffectConfigToken token) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 167
   at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 267
   --- End of inner exception stack trace ---
   at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 443
   at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 399
   at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 345
   at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass47_5.<RunEffectImpl>b__5() in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 1068
 

 

Big McThankies From McSpankies!

sakana sig resized.png

Link to comment
Share on other sites

  • 1 year later...

I just started a thread

and someone pointed me at FFT.  I found this plug I found this plug in.  But, when I use it, I get all blue or all black.

 

I just searched, and I do have a copy of libfftw3-3.dll.  It came with Inkscape, and I just checked and the Inkscape/bin folder is in the path.

 

There's only the one control on the effect, so there isn't much I can be doing wrong.

 

What can I do to troubleshoot this?

Link to comment
Share on other sites

Are you just trying to remove the background?  If so, you can do this for free here.

 

If, on the other hand, you are trying to remove the 'bumpiness' of the canvas on the image, here is a solution I did for another person with the same problem.  Athough not perfect, it is not easy to remove a texture without blurring.

 

 

 

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

On 12/11/2020 at 10:13 AM, Pixey said:

Are you just trying to remove the background?  If so, you can do this for free here.

 

If, on the other hand, you are trying to remove the 'bumpiness' of the canvas on the image, here is a solution I did for another person with the same problem.  Athough not perfect, it is not easy to remove a texture without blurring.

 

 

 

Thanks for the suggestion.  I've played around with that plugin, a little.  As you found in the other thread, it's difficult to find something that hides the physical texturing without blurring and posterizing the skin tones so much that it plummets in quality.

 

Was the original response I got correct?  Is FFT the correct tool for this sort of situation?  If someone can help me troubleshoot the issue I'm having, I'd like to give it a try.  Should I look for another copy of libfftw3-3.dll and drop it into the Paint.NET folder?

Link to comment
Share on other sites

12 hours ago, Mighty said:

Is FFT the correct tool for this sort of situation? 

 

I really don't know and hopefully @Reptillian who suggested it, can help you a bit more on what this does.  I've downloaded this myself and also get a very black result.  I'm also not sure where this libffw3-3.dll is supposed to go.  I googled it and it sounds like it's supposed to be in the Windows Folder?  Hopefully someone else can explain about this.

 

There is another Plugin which may be of help:

 

 

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...