Show us yer programming projects!

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
Devlin
Baaaaa!
Baaaaa!
Posts: 1380
Joined: Tue Aug 02, 2005 10:53 pm 0
XBL Gamertag: Anarkhis
Location: Bradford, Sacred Sod of God's Own County
Contact:

Re: Show us yer programming projects!

Post by Devlin »

tufty wrote:Cheers mate. I've gone quite a bit further now, and my Wacom driver is working almost 100%, generating perfectly functional HID events from ADB packets.

This is something Dave Fleck from Wacom told me was flat out impossible...

Image
That is gnarly.
User avatar
Istar
Baaaaaa!
Baaaaaa!
Posts: 4869
Joined: Mon Apr 22, 2002 4:42 pm 0
Location: London, UK.

Re: Show us yer programming projects!

Post by Istar »

I have an implicit distrust of anyone who purports to understand the art and science of software engineering saying that something is impossible. Especially when the challenge is entirely in the domain of turning one sort of data into another. It's what computers do.

Good work! :D
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

Please write me a program capable of solving the traveling salesman problem in polynomial time and memory.

kthxbye.
SiN
Baaaa!
Baaaa!
Posts: 850
Joined: Sat Dec 11, 2004 4:25 am 0
Location: Canada
Contact:

Re: Show us yer programming projects!

Post by SiN »

GoatFoam wrote:Please write me a program capable of solving the traveling salesman problem in polynomial time and memory.

kthxbye.
lol :lol: :lol:
32x32 . duotrix . geomex . smiley's shooty adventure . by caffeine monster software | my blog
User avatar
the2bears
Baaaaaa!
Baaaaaa!
Posts: 3686
Joined: Wed Oct 27, 2004 9:30 pm 0
Location: The City by the Bay
Contact:

Re: Show us yer programming projects!

Post by the2bears »

GoatFoam wrote:Please write me a program capable of solving the traveling salesman problem in polynomial time and memory.

kthxbye.
Cue halting problem... and 3, 2, 1.

You know what's funny? Looking at the above sentence just now I can't really decide if it's "Cue" or "Queue". I think there's a case for both :lol:

Bill
the2bears - the indie shmup blog
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

the2bears wrote: Cue halting problem...
Easy. All programs will halt if you pull the plug out.
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

STM is still under active development. I added a png reader recently, so I can crunch images almost straight from my digital camera.

Here is some processing on an image I nicked from the web (I will edit it to use one of my own pictures when I get home).

Image
Initial image. 48bpp png.

Image
"Global" tone mapping. Very fast & cheap.

Image
"Local" tone mapping with multilevel gaussian filter. Increased contrast.

Image
"Local" tone mapping with image segmentation. Increased contrast with different tradeoffs.

And I'm going to hell for being a naughty copyright violator.
User avatar
Orangy Tang
Baaaaa!
Baaaaa!
Posts: 1794
Joined: Sun Apr 25, 2004 5:25 pm 0
Location: My secret lab
Contact:

Re: Show us yer programming projects!

Post by Orangy Tang »

GoatFoam wrote:STM is still under active development. I added a png reader recently, so I can crunch images almost straight from my digital camera.
Image
"Local" tone mapping with image segmentation. Increased contrast with different tradeoffs.

And I'm going to hell for being a naughty copyright violator.
Impressive! What does the config/script look to do something like this?
[ Triangular Pixels.net - play Snowman Village, Rescue Squad, NiGHTS 4k and more ] [ Development Journal ]
User avatar
jrc313
Baaaaa!
Baaaaa!
Posts: 1824
Joined: Mon Aug 02, 2004 12:48 pm 0
PSN: jrc313
Location: Near Manchester
Contact:

Re: Show us yer programming projects!

Post by jrc313 »

I'm particularly impressed by the lack of noise and that over-processed look that tend to plague most HDRed images. Nice work.
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

The config I used for that one looks like:

Code: Select all

#
# Tone map with the Reinhard photographic operator with local adaptation
# provided by a multi level image segmentation.
#

# first load processors
PROCESSORS:
1 = "photographic"
2 = "coltolum" # extract brightness channel.
3 = "segment" # blur the brightness channel.

# Now add dependencies
DEPENDENCIES:
1:0 <- 0 # slot 0 is populated by src
1:1 <- 3 # Take processed luminance channel.

2:0 <- 0 # image -> luminance

3:0 <- 2 # luminance -> local adaptation

# Now set parameters
PARAMETERS:

# Set up compressor
1:"key"           = 0.18
1:"contrast"      = 1.3 # slightly enhanced contrast

#set up filtering
3:"number of layers" = 500   # number of layers to blend together.

OUTPUT: 1                                                          
The first part tells it to install a bunch of image processing black boxes, the second part establishes data flow between them and the third part sets parameters.
User avatar
failrate
Baaaaaa!
Baaaaaa!
Posts: 2354
Joined: Sun May 23, 2004 6:54 am 0
Location: Sandy Eggo
Contact:

Re: Show us yer programming projects!

Post by failrate »

Fuck me, but that is awesome. Erm, I can't remember, but izzat Windows-only? I have some poorly lit vacation photos of some heritage buildings in South Korea that I'd like to fix.
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

It builds on linux and mac at the moment. I wouldn't mind doing a windows port, but it will have to wait until I get a new laptop.

If you want to grab the latest copy then you need OpenEXR, libpng and libtiff installed. Get a copy of Mercurial from http://mercurial.selenic.com/ and run:

Code: Select all

> hg clone http://www.spectral3d.co.uk/repo/stm
> cd stm
If you want to grab updates later then

Code: Select all

> hg pull http://www.spectral3d.co.uk/repo/stm
To build:

Code: Select all

> make linux #or make mac
It will put the binaries into dist/. My makefiles are crap, so you may need to "make clean" to do updates.

It needs a few environment variables set. Currently there is a cheesy script for that.

Code: Select all

> source ./path
There is a test_module program that can be used to see if it is configured correctly. Run it like this:

Code: Select all

> ./test_module compressor
attempting to load library /Users/davidb/Projects/stm/dist/lib//libcompressor.dylib
Loaded module compressor
*** FILE LOADERS ***
*** FILE SAVERS ***
*** PROCESSORS ***

Processor "Simple dynamic range compression." (compressor)
Output: xyY
Inputs (mandatory): 0: xyY, 
Inputs (optional):  1: Luminance, 
Parameters:
    min luminance: float = 1e-05 (1e-05,1e+20)
    max luminance: float = 1e+10 (1e-05,1e+10)
    discard dark: int = 5 (0,50)
    discard bright: int = 5 (0,50)
    contrast: float = 1 (0,20)
    gamma: float = 1 (0,20)
    compression function: enum = [2,gamma]([0,ashikhmin], [1,logarithmic], [2,gamma], [3,linear], )
    normalise: boolean = true
To actually process an image then something like this will do:

Code: Select all

> ./tonemap -c simple.cfg -i myfile.png -o test.png
If you have multiple cores then you can add worker threads with the -t option.

On the noise front: I have never managed to get an image quite as noise free as that one. I'm guessing the source image I nicked was made from pics taken at a low iso setting with a fast lens, then it was cleaned up and reduced in size to smooth out the noise. Or maybe I just have a crap camera :)

As with all dynamic range stretching things I'm afraid my code will boost noise along with everything else, so you need to be a bit careful. I have been thinking that a chroma noise processor might be my next plugin Maybe this lunchtime :)
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

OOPS!

I ftpd some noise reduction tests over the pics from my last posting.

Anyway. Do these look like results worth pursuing?

I'm only trying for chroma noise at the moment, as it is just nasty.

http://www.spectral3d.co.uk/misc/chroma.html
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

I'm just uploading some new pics to that page.

WARNING: BIG!
User avatar
oddbob0
Baaaaa!
Baaaaa!
Posts: 1727
Joined: Mon Mar 01, 2004 7:43 pm 0
Location: Liverpool

Re: Show us yer programming projects!

Post by oddbob0 »



Click through for big-o-vision. Still a WIP, but coming on.
\m/
Post Reply