Converting .eps to .png Easily

http://scott.sherrillmix.com/blog/programmer/converting-eps-to-png-easily/

You can use ImageMagick to convert EPS file to PNG format easily. Simply

convert Img.eps Img.png

This will give you the png file with DPI 72. If you want to set the DPI for your png file, use

convert -density 300 Img.eps Img.png,

then an image with DPI 300 would be generated.

To process a batch of files, you can simply use command mogrify. For example,

mogrify -format png -density 300 *.eps

Graph data structures

Recently, I’m trying to re-implement the naive Belief Propagation algorithm on image girds, and then extend it to general graphs. It took me a while to figure out that I need some graph data structures to represent the general graph. It is easy to implement the algorithm on grids, since the girds have fixed pattern, that is, every node has four neighbours except the boundary nodes. While for the general graph, I need to define some graph data structures, such as Adjacency Matrix, adjacency list, or edge list (http://www.boost.org/doc/libs/1_42_0/libs/graph/doc/graph_theory_review.html). Or I can use some other graph libraries, such Boost Graph Library (GBL) and CGAL ( a good extension of GBL). GBL has integrated some graph algorithms already, such as max-flow and minimum spanning tree.

DIY GPS unit

Need to build a GPS unit for my next project. Searched on line and found lots of information about GPS tracker. A good one of them is Trimble Trimtrac Locator. It’s an affordable GPS tracker for common people like the one used by spies to track the vehicle of VIPs. It combines a GPS receiver and GSM unit into one single chip. Perfect for my case.

But I found an even cheaper solution that doesn’t come with a wireless transmission unit. This requires people to build it by themselves. All they need is a GPS receiver (e.g. EM-406A), a SD Datalogger which parses the data from GPS receiver and saves it into a SD card, a SD card, LiPo batteries and some cables and connectors. I believe it’s easy to build and very cheap (under $150). Even better for my case. You can check the good GPS buying guide from SparkFun.

crop image in illustrator

To really crop an image in Illustrator, so that you can discard extraneous portions and keep only what you want, do the following:

1. Draw a rectangle (filled) where you want to crop (as you know, short of using a clipping mask, a raster image is always rectangular) and set its opacity to 0%;
2. Select raster image and rectangle, go to Object>Flatten Transparency, slide the quality slider to 100%, and make sure the Alpha Channel option is UNchecked;
3. Deselect all, and select the portion you want to keep, release the clipping mask and extract;
4. Discard unused portions.

from http://www.tek-tips.com/viewthread.cfm?qid=1028375&page=1

Using more than 3G memory on 32bit windows

I have a Xeon server with 8G memory. For some reason I have to stick with windows xp 32bit. That’s really a pain for me because of the 2G limit for application space while I need a lot more memory to cache the data from 8 1394b cameras working at 1024×768@30fps. These 2G memory could only hold on less than 1 second before it is filled up. I tried to use JPEG compression to reduce the data flow to the hard drive, and also used RAID0 to increase the performance. However, this problem is finally solved by ramdisk. I’m so excited about this. This issue has confused me about 2 yrs.

———————————-
http://www.trap17.com/index.php/4gb-Xp-32bits_t67548.html
……………………………………………….
Step 2
You need to download Gavotte’s RAMdisk. There’s many options, but usually they are paid options, or they aren’t able to make use of the unadress RAM. It’s not the case of Gavotte’s Ramdisk, it’s a freeware that can use that unseen RAM.
http://www.easy-share.com/1907118935/Gavot…5_200811130.zip

Step 3
Unzip the folder and double-click “ram4g.reg” file. You need this Registry before doing anything else.

Step 4
Go to C:\ and open your boot.ini with Notepad. Here you’re going to see something like that:

CODE
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows XP Professional

” /noexecute=optin /fastdetect

Add /pae ate the end of the line: then reboot
…………………………………………………..

compression library

For my multi-camera project, I need to use some compression library to round the 2G user application space limit, otherwise I can capture the data for only 1~2 secs before all the memory is filled up. I have tried to switch to 64 bit system before, but the camera driver didn’t work stably. Today I wrote a test program using a very good lossless compression library – Zlib. I thought this would meet my expectation, but the test compression ratio is only 1.7:1 for a typical scene. I guess I have to try some lossy compression library, like jpeg image compression library, this would definitely suit my case.

Independent JPEG Group
Where can I get image compression program?

3D body scanner

I have seen several types of 3D scanners for our face recognition projects before. Most of them are based on laser technologies. The subjects usually need to sit still for a couple of seconds for the device to collect enough data samples. Here comes a new one – Intellifit Virtual Fitting Room™ (VFR) – for consumer markets.

http://www.it-fits.info/Home.asp

The following materials are copied from their website.

————————————

The VFR sends safe, low power radio waves toward the customer’s fully clothed body and, in about ten seconds, collects numerous data points that are used to calculate their accurate body measurements. The “vertical wand” in the Intellifit Virtual Fitting Room™(VFR) contains 196 small antennas that send and receive low power radio waves. In the fifteen seconds it takes for the wand to rotate around a fully clothed individual, the radio waves send and receive low power signals.

The signals don’t “see” a customer’s clothing but reflect off their skin which is, basically, water. The signals are similar to cell phone signals but less than 1/350th of the power of those signals and they do not penetrate the skin.

When the wand’s rotation is complete, Intellifit has recorded over 200,000 points in space, basically x, y, and z coordinates of where that customer is standing. Intellifit software then electronically measures the “point-cloud”, producing a file of dozens of accurate body measurements; the raw data is then discarded.

—————————————————————

How to capture smoke

For my fluid project, I have to test our model on gas flows, besides water waves. I first started searching at flickr, and it turned out that I was right. There are hundreds of image about smoke, they are really amazing and pieces of art. Then I began to think about how to capture these smoke images. I had a rough idea but still didn’t know how to start, and what equipments do I need. Finally, I found this article. It not only teaches you how to set up the environment, but also offers some techniques to process the raw images in photoshop.

Smoke Photography
Capturing Delicate Wisps of Smoke
Written by Steve Paxton
http://paxtonprints.com/index.php?x=smoke

CFD packages

For this summer, I will do some projects related to fluid surface reconstruction. And it is very important to have some flexible solvers for partial derivative equations, like Navier Stokes equations. I searched on-line, and it took me some time to find this. http://www.innovative-cfd.com/cfd-solver.html. Some good non-commercial solvers for computational fluid dynamics are as followings, Wind-US, OpenFOAM, CFL3D, OVERFLOW, USM3D, Gerris and etc.