Skip to content

ImageProcessing-ElectronicPublications/stb-image-frpf2-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

The image is scaled using "Find Replicant Pixel Fast".

Origin

orig



Upsampling x2

stbimfrpf2 butterfly.png butterfly.x2frpf2.png 
Load: butterfly.png
image: 256x256:3
process: downsample
process: gradient
process: FRPF2
 region: all
 threshold: 0
Save png: butterfly.x2frpf2.png

x2

Upsampling x4

stbimfrpf2 butterfly.x2frpf2.png butterfly.x4frpf2.png 
Load: butterfly.x2frpf2.png
image: 256x256:3
process: downsample
process: gradient
process: FRPF2
 region: all
 threshold: 0
Save png: butterfly.x4frpf2.png

x4

Compare

Bicubic

stbresize -r 4 butterfly.png butterfly.x4cubic.png
Load: butterfly.png
image: 256x256:3
resize: 1024x1024:3
method: bicubic
Save png: butterfly.x4cubic.png

x4c

FRP2 (long!!!)

stbimfrp2 butterfly.png butterfly.x2frp2.png 
Load: butterfly.png
image: 256x256:3
process: downsample
process: gradient
process: FRP2
Save png: butterfly.x2frp2.png
stbimfrp2 butterfly.x2frp2.png butterfly.x4frp2.png 
Load: butterfly.x2frp2.png
image: 256x256:3
process: downsample
process: gradient
process: FRP2
Save png: butterfly.x4frp2.png

x4l


Option radius find

Balance of execution time and quality of the result.

stbimfrpf2 -r 32 butterfly.png butterfly.x2frpf2.r32.png 
Load: butterfly.png
image: 256x256:3
process: downsample
process: gradient
process: FRPF2
 region: 65x65
 threshold: 0
Save png: butterfly.x2frpf2.r32.png
stbimfrpf2 -r 32 butterfly.x2frpf2.r32.png butterfly.x4frpf2.r32.png 
Load: butterfly.x2frpf2.r32.png
image: 512x512:3
process: downsample
process: gradient
process: FRPF2
 region: 65x65
 threshold: 0
Save png: butterfly.x4frpf2.r32.png
stbimfrpf2 -r 64 butterfly.x4frpf2.r32.png butterfly.x8frpf2.r32.png 
Load: butterfly.x4frpf2.r32.png
image: 1024x1024:3
process: downsample
process: gradient
process: FRPF2
 region: 65x65
 threshold: 0
Save png: butterfly.x8frpf2.r32.png

x4l

stbimfrpf2 -r 64 butterfly.png butterfly.x2frpf2.r64.png 
Load: butterfly.png
image: 256x256:3
process: downsample
process: gradient
process: FRPF2
 region: 129x129
 threshold: 0
Save png: butterfly.x2frpf2.r64.png
stbimfrpf2 -r 64 butterfly.x2frpf2.r64.png butterfly.x4frpf2.r64.png 
Load: butterfly.x2frpf2.r64.png
image: 512x512:3
process: downsample
process: gradient
process: FRPF2
 region: 129x129
 threshold: 0
Save png: butterfly.x4frpf2.r64.png
stbimfrpf2 -r 64 butterfly.x4frpf2.r64.png butterfly.x8frpf2.r64.png 
Load: butterfly.x4frpf2.r64.png
image: 1024x1024:3
process: downsample
process: gradient
process: FRPF2
 region: 129x129
 threshold: 0
Save png: butterfly.x8frpf2.r64.png

x4l


Option threshold find

Balance of execution time and search accuracy.

stbimfrpf2 -t 16 butterfly.png butterfly.x2frpf2.t16.png 
Load: butterfly.png
image: 256x256:3
process: downsample
process: gradient
process: FRPF2
 region: all
 threshold: 16
Save png: butterfly.x2frpf2.t16.png
stbimfrpf2 -t 16 butterfly.x2frpf2.t16.png butterfly.x4frpf2.t16.png 
Load: butterfly.x2frpf2.t16.png
image: 512x512:3
process: downsample
process: gradient
process: FRPF2
 region: all
 threshold: 16
Save png: butterfly.x4frpf2.t16.png
stbimfrpf2 -t 16 butterfly.x4frpf2.t16.png butterfly.x8frpf2.t16.png 
Load: butterfly.x4frpf2.t16.png
image: 1024x1024:3
process: downsample
process: gradient
process: FRPF2
 region: all
 threshold: 16
Save png: butterfly.x8frpf2.t16.png

x4l



Releases

No releases published

Packages

No packages published