-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9067409
Showing
8 changed files
with
1,416 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Use gimptool-2.0 to sett these variables | ||
GIMPTOOL=gimptool-2.0 | ||
PLUGIN_BUILD=$(GIMPTOOL) --build | ||
PLUGIN_INSTALL=$(GIMPTOOL) --install-bin | ||
GCC=g++ | ||
LIBS=$(shell pkg-config fftw3 gimp-2.0 --libs) | ||
CFLAGS=-O2 $(shell pkg-config fftw3 gimp-2.0 --cflags) | ||
VERSION=0.4.1 | ||
DIR=fourier-$(VERSION) | ||
|
||
export | ||
|
||
FILES= \ | ||
fourier.c \ | ||
Makefile \ | ||
Makefile.win \ | ||
README \ | ||
README.Moire \ | ||
fourier.dev | ||
|
||
all: fourier | ||
|
||
# Use of pkg-config is the recommended way | ||
fourier: fourier.c | ||
$(GCC) $(CFLAGS) $(LIBS) -o fourier fourier.c | ||
|
||
# To avoid gimptool use, just copy the fourier in the directory you want | ||
install: fourier | ||
$(PLUGIN_INSTALL) fourier | ||
|
||
dist: | ||
mkdir $(DIR) | ||
cp $(FILES) $(DIR) | ||
tar czf "$(DIR).tar.gz" $(DIR) | ||
rm -Rf $(DIR) | ||
|
||
clean: | ||
rm -f fourier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Project: Fourier | ||
# Makefile created by Dev-C++ 4.9.9.0 | ||
|
||
CPP = g++.exe | ||
CC = gcc.exe | ||
WINDRES = windres.exe | ||
RES = | ||
OBJ = fourier.o $(RES) | ||
LINKOBJ = fourier.o $(RES) | ||
LIBS = -L"C:/Program Files/Dev-cpp/lib" -mwindows -lgimpui-2.0 -lgimpwidgets-2.0 -lgimp-2.0 -lgimpcolor-2.0 -lgimpmath-2.0 -lgimpbase-2.0 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lfftw3 -fmessage-length=0 | ||
INCS = -I"C:/Program Files/Dev-cpp/include" -I"C:/Program Files/Dev-Cpp/include/gtk-2.0" -I"C:/Program Files/Dev-Cpp/include/glib-2.0" -I"C:/Program Files/Dev-Cpp/lib/glib-2.0/include" -I"C:/Program Files/Dev-Cpp/lib/gtk-2.0/include" | ||
CXXINCS = -I"C:/Program Files/Dev-cpp/include/c++/3.3.1" -I"C:/Program Files/Dev-cpp/include/c++/3.3.1/mingw32" -I"C:/Program Files/Dev-cpp/include/c++/3.3.1/backward" -I"C:/Program Files/Dev-cpp/lib/gcc-lib/mingw32/3.3.1/include" -I"C:/Program Files/Dev-cpp/include" -I"C:/Program Files/Dev-Cpp/include/gtk-2.0" -I"C:/Program Files/Dev-Cpp/include/glib-2.0" -I"C:/Program Files/Dev-Cpp/lib/glib-2.0/include" -I"C:/Program Files/Dev-Cpp/lib/gtk-2.0/include" | ||
BIN = Fourier.exe | ||
CXXFLAGS = $(CXXINCS) -I"C:\Program Files\Dev-Cpp\include\fftw" -fmessage-length=0 | ||
CFLAGS = $(INCS) -fmessage-length=0 | ||
|
||
.PHONY: all all-before all-after clean clean-custom | ||
|
||
all: all-before Fourier.exe all-after | ||
|
||
|
||
clean: clean-custom | ||
rm -f $(OBJ) $(BIN) | ||
|
||
$(BIN): $(OBJ) | ||
$(CPP) $(LINKOBJ) -o "Fourier.exe" $(LIBS) | ||
|
||
fourier.o: fourier.c | ||
$(CPP) -c fourier.c -o fourier.o $(CXXFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Plugin GIMP : Fourier Transform | ||
|
||
I. What it does | ||
|
||
It does a direct and reverse Fourier Transform. | ||
It allows you to work in the frequency domain. | ||
For instance, it can be used to remove moir� patterns from | ||
images scanned from books. (See README.Moire) | ||
|
||
II. Use | ||
|
||
It adds menu items : | ||
Filters/Generic/Foward FFT | ||
Filters/Generic/Inverse FFT | ||
|
||
III. Installation | ||
|
||
Linux: | ||
make | ||
make install | ||
|
||
You will need the fftw3 package, and the development packages | ||
of gimp, fftw3, and glib. | ||
|
||
Win32: | ||
|
||
Binaries for win32 are provided (in a separate package), just copy the files | ||
in the plugins directory of : | ||
your personal gimp directory (ex: .gimp-2.2\plug-ins), | ||
or in the global directory (C:\Program Files\GIMP-2.2\lib\gimp\2.0\plug-ins) | ||
|
||
If you don't have fftw3 installed on your system, you must download | ||
the provided fftw3.dll, and copy it where you stored the plugin. | ||
|
||
You can compile it with the free environment DevCPP (mingw compiler). | ||
You will need several DevPak : fftw3, GTK and gimp-dev (available on | ||
devpaks.org). gimp-dev is designed to work with binaries version of | ||
|
||
History : | ||
v0.1.1 : First release of this plugin | ||
v0.1.2 : BugFixes by Mogens Kjaer <[email protected]>, May 5, 2002 | ||
v0.1.3 : Converted to Gimp 2.0 (dirty conversion) | ||
v0.2.0 : Many improvements from Mogens Kjaer <[email protected]>, Mar 16, 2005 | ||
* Moved to gimp-2.2 | ||
* Handles RGB and grayscale images | ||
* Scale factors stored as parasite information | ||
* Columns are swapped | ||
v0.3.0 : Great Improvement from Alex Fern�ndez with dynamic boosting : | ||
* Dynamic boosted normalization : | ||
fft/inverse loss of quality is now un-noticeable | ||
* Removed the need of parasite information | ||
v0.3.1 : Zero initialize padding (patch provided by Rene Rebe) | ||
v0.3.2 : GPL, Fixed Makefile with pkg-config | ||
v0.4.0 : Patch by Edgar Bonet : | ||
* Reordered the data in a more natural way | ||
* No Fourier coefficient is lost | ||
|
||
Many thanks to Mogens Kjaer, Alex Fern�ndez, Rene Rebe and Edgar Bonet | ||
for their contributions. | ||
|
||
-- | ||
R�mi Peyronnet | ||
[email protected] | ||
http://www.via.ecp.fr/~remi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
This plug-in to Gimp does a FFT of an image. | ||
|
||
I've used this with success to remove moir� patterns from | ||
images scanned from books: | ||
|
||
The image should be in RGB. Remove the alpha layer, | ||
this makes it easier (Layers|Flatten image). | ||
|
||
Select Filters|Render|FFT directe | ||
|
||
In the Layers window, select the layer, and "Duplicate Layer". | ||
|
||
Select Image|Colors|Brightness-Contrast. Increase Contrast so | ||
you can see the patterns. | ||
|
||
The area in the upper left and upper right is the FFT of the | ||
real image; don't modify this. The FFT of the moir� pattern | ||
is outside these regions. Use the Rectangular Selection or | ||
Elliptical Selection tools to select these regions. | ||
|
||
Remove the copy layer: This will leave the original FFT | ||
image with the selections. | ||
|
||
Choose (128,128,128) as the background color. | ||
|
||
Select Edit|Fill with BG color. | ||
|
||
Remove the selections from the image. | ||
|
||
Select Filters|Render|FFT inverse | ||
|
||
Voil�, now you have an image without the moir� pattern! | ||
|
||
It was originally written by R�mi Peyronnet <[email protected]>, | ||
I have corrected a few bugs in it. | ||
|
||
Files: | ||
|
||
gpplugin.tar.gz: Contains these files: | ||
gpplugin.c: The source code | ||
Makefile: The Makefile | ||
README: This file | ||
|
||
Mogens Kjaer | ||
[email protected] | ||
May 5, 2002 |
Oops, something went wrong.