Here you have it: the largest, most complex programming project now available on tannerhelland.com. Originally a final project for a university bioinformatics course, this artificial life simulator has now been completely retooled as a full-blown lesson in evolution and population genetics. As with most artificial life simulators, a set of simple artificial creatures compete for limited resources. Each creature has a strand of pseudo-DNA that determines three basic attributes: size, speed, and range (how far it can see)…
Today’s project is something new to this site – bioinformatics code! I feel a tad ridiculous that it’s taken me so many years to post code related to my field, but hey – better late than never. Read on to discover the awesomeness of Hidden Markov models, the Viterbi algorithm (also known as Viterbi paths), CpG islands, and how these all work together to help scientists locate genes.
I’m guessing you’ve seen this style of image before – a sort of pseudo-antique filter than can make any image look like it was taken with a very old camera. There are many ways to programmatically generate images like this, and in this article I’ve put together one that does more than just make the image look “brown.” This filter involves several steps (fading, multiplicative brightness, and gamma correction, among others) and results in a conversion that not only adds a sepia coloring, but also gives an image a histogram more in keeping with older photos.
Today’s article brings a collection of random image effects that can be quickly (and programmatically) generated. In an attempt to give the project some coherency, I’ve named each effect after something “nature-themed” so as to help distinguish them. As always, full source code and a sample .exe is provided…
The ability to create custom filters is a mainstay of any quality graphics application. A robust matrix-based filter engine can be used to create tens – even hundreds – of unique image effects by simply manipulating the matrices that get passed into the engine. In this project, I’ve provided a 5×5 custom filter engine with support for both scaling and biasing. This is identical to the custom filter engine provided by Photoshop, and mine is even slightly faster (at least for the screen-sized images I’ve been testing)…
Edge detection (also called “boundary detection”) is a fundamental problem in image processing. The ability to accurately detect visible “edges” in an image has many applications – from missile targeting to OCR to cool Photoshop effects. In this project, I’ve compiled 6 well-known edge detection algorithms (along with two of my own for fun). Full VB6 source code is provided, as well as an .exe for those just interested in the effects alone…
As promised, here is the second half of my histogram code project. In this project, I’ll show you how to stretch a histogram, equalize individual channels, and – most useful of all – equalize an image’s overall luminance. Cool, eh?
Today’s project demonstrates how to quickly and efficiently generate an image histogram. Histograms are invaluable for understanding and implementing a multitude of image processing techniques – including brightness, contrast, levels, curves, equalizing, and more – so it’s worth taking some time to experiment with them. As always, DIB sections are used to generate and render the histograms in real-time…
This little program demonstrates two key graphics programming principles: 1) simple “painting” code – basically, connecting a series of lines together as the user drags their mouse around, and 2) an implementation of the hard-to-find (and poorly documented) dll call for filling a contiguous region of an image. (Photoshop users should know this as the “paint bucket” tool.) As always, sample code and full documentation is provided…
Because the first draft of this project has become so popular, I’ve gone ahead and built a new and MUCH faster version. Updates include: DIB sections for flame drawing, look-up tables, optimized randomization, and custom flame coloring. On my old 1.6ghz laptop this version runs over 4x faster than version 1.0. Enjoy!