misc

Photos with my new usb microscope (20X-400X 1.3MP Digital Microscope)

I have been quite pleased with my previous microscope but I decided to buy a slightly better one from dealextreme as double the magnification was available for only a slightly higher cost.

product link) It only cost $48.20 USD (about £31.27 GBP) only $8 than my previous microscope that could only achieve 200x!

20X-400X 1.3MP Digital Microscope

20X-400X 1.3MP Digital Microscope


20X-400X 1.3MP Digital Microscope with nice markings of the magnification

20X-400X 1.3MP Digital Microscope with nice markings of the magnification

Quick Review
Advantages

  • Large dynamic zoom range (labelled 20x – 400x)
  • Easy to setup (plug and play)
  • Can take some awesome photos, see below
  • Variable illumination settings (using a wheel at top)
  • Rubberised casing gives better grip and good overall feel
  • Much improved build quality over the digimicro
  • Stand is sturdy and can hold camera still in place

Comparison to the digimicro

Digimicro vs New Microscope

Digimicro vs New Microscope


Comparison of microscopes at minimum zoom level

Comparison of microscopes at minimum zoom level


Comparison of microscopes at maximum zoom level

Comparison of microscopes at maximum zoom level

Magnification measurement
The images are taken with the edge of the camera case pressed right up against the ruler. You could probably remove casing to increase zoom slightly, or create a slot to slide a microscope slide into it. The camera has two focuses the first:

First focal point of microscope

First focal point of microscope

And the second (maximum zoom):

Second focal point of microscope (0.5mm spacing between lines)

Second focal point of microscope (0.5mm spacing between lines)

6mm displayed over 170mm: zoom ~ 30x
0.5mm displayed over 180mm: zoom ~ 360x

This isn’t far off the specified 20x – 400x so I am happy! (Note: Measuring magnification level is rubbish as it depends on screen the image is viewed on, so viewing it on a projector would make the statistics seem more impressive.)

The minimum zoom is less than this as we can move the camera further from the object

Setup in Linux

The beauty of this webcam is that it requires no installation with ubuntu 10.04 you simply need to run the software and the camera works! woo! The output of `lsusb` shows the device as:

Bus 001 Device 004: ID 0ac8:3610 Z-Star Microelectronics Corp.

Software
Most video programs will pick up the device, I am opting to use a program called cheese which is awesome not only because of the name but also because of its simplicity.

sudo apt-get install cheese

Bonus Picture

This is a photo of the pixels on a nexus one phone to show the pentile pixel layout

Nexus One Screen Under the Microscope

Nexus One Screen Under the Microscope

As before any requests for microscope images (within reason) will be considered 🙂

Read More

Best spam comment ever

Just noticed this little beauty sitting in my comment spam, found it hilerious so I thought I’d share it:

HELP! I’m currently being held prisoner by the Russian mafia xyzrxyz penis enlargement xyzrxyz and being forced to post spam comments on blogs! If you don’t approve this they will kill me. xyzrxyz penis enlargement xyzrxyz They’re coming back now. Please send help!

Needless to say I’ve purchased several penis enlargement kits to ensure this persons safety.

Information

Author : penis enlargement (IP: 213.5.67.159 , hosted-by.altushost.com)
E-mail : mattcut90@gmail.com
URL : http://www…….. Censored………..com
Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=213.5.67.159

IP address lookup

Read More

Borderlands hidden QR codes

I found an easter egg in borderlands:

Borderlands hidden QR codes

Borderlands hidden QR codes


zoomed in on the qr code

zoomed in on the qr code

So I used a barcode reader on my Nexus One

Plaintext:

NICK WILSON

HO OH

However I am not the only person to have spotted this, unsurprisingly really as I’m almost half a year late on starting the game. There are several QR codes hidden as shown in this wiki page and someone else went to the pain-staking task of copying out this QR code pixel-by-pixel rather than using a QR scanner or image software, crazy!

Read More

Microscope images of my eye (by request)

More microscope image of eyes were requested (by Benjie), trying to focus more on the detail of the eye by using external illumination. Unfortunately the camera has some colour problems when not using the built in LEDs, possibly because it attempts compensates for the lack of illumination. Hopefully I am not in danger of someone cloning my retinal scan to gain access to my confidential files.

Black and white microscope image of my eye

Black and white microscope image of my eye


Clear reflection of my laptop in a black and white microscope image of my eye

Clear reflection of my laptop in a black and white microscope image of my eye


Coloured illuminated microscope image of my eye

Coloured illuminated microscope image of my eye


Coloured illuminated microscope image of my eye (see the blood vessels)

Coloured illuminated microscope image of my eye (see the blood vessels)

Read More

Compiling and running CUDA 2.3 SDK and toolkit on ubuntu 9.10 x64 (64-bit)

I’ve heard a lot about CUDA, such as how it is 10,000% faster at cracking wireless passwords over a conventional program/hardware, but never really got around to testing it out before now. This post details the steps required to compile and setup CUDA 2.3 SDK and toolkit on ubuntu 9.10.

Downloads
You are required to have an Nvidia graphics driver (relatively new version) already installed. First download the CUDA toolkit and CUDA sdk from the Nvidia CUDA 2.3 download page.

Install the toolkit

# Make file executable
chmod +x cudatoolkit_2.3_linux_64_ubuntu9.04.run
# Run it as superuser
sudo ./cudatoolkit_2.3_linux_64_ubuntu9.04.run

You now need to edit your .bashrc file in your home directory to include the paths (so your CUDA binaries can be found by the system)

export PATH=${PATH}:/usr/local/cuda/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64

Note if you are using 32bit then “lib64” should be replaced with just “lib”

Install the SDK

# Make file executable
chmod +x cudasdk_2.3_linux.run
# Run it as normal user
./cudasdk_2.3_linux.run

You should now have a NVIDIA_GPU_Computing_SDK folder in your home directory. Change directory into the C folder inside this one.

cd NVIDIA_GPU_Computing_SDK/C

In this folder is a make file which will compile all the Nvidia SDK and all the demos, in order for this to work in ubuntu 9.10 (x64) you will need to install several dependencies. By installing these before attempting to make will save you a lot of time, if you are getting errors please scroll down to the problems section to see if they are already covered.

# Install the necessary libraries
sudo apt-get install freeglut3 freeglut3-dev libx11-dev mesa-common-dev libxmu6

Making and running demos

You can then run the make command, once this is ran all of the executables will be placed in NVIDIA_GPU_Computing_SDK/C/bin/linux/released . We can check that our computer has an useable CUDA device install by running the deviceQuery program:

cd ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/released
./deviceQuery

This should output something similar to the following:

# ./deviceQuery
CUDA Device Query (Runtime API) version (CUDART static linking)
There is 1 device supporting CUDA

Device 0: "GeForce GTX 260"
  CUDA Driver Version:                           2.30
  CUDA Runtime Version:                          2.30
  CUDA Capability Major revision number:         1
  CUDA Capability Minor revision number:         3
  Total amount of global memory:                 938803200 bytes
  Number of multiprocessors:                     27
  Number of cores:                               216
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 16384
  Warp size:                                     32
  Maximum number of threads per block:           512
  Maximum sizes of each dimension of a block:    512 x 512 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 1
  Maximum memory pitch:                          262144 bytes
  Texture alignment:                             256 bytes
  Clock rate:                                    1.47 GHz
  Concurrent copy and execution:                 Yes
  Run time limit on kernels:                     Yes
  Integrated:                                    No
  Support host page-locked memory mapping:       Yes
  Compute mode:                                  Default (multiple host threads can use this device simultaneously)

Test PASSED

Now that we can see CUDA is successfully installed and a suitable device is found we can run some of nvidia’s more ascetically pleasing demos:

./fluidsGL
CUDA SDK example fluidsGL on ubuntu 9.10 x64

CUDA SDK example fluidsGL on ubuntu 9.10 x64

./smokeParticles
CUDA SDK example smokeparticles on ubuntu 9.10 x64

CUDA SDK example smokeparticles on ubuntu 9.10 x64

./particles
CUDA SDK example particles on ubuntu 9.10 x64

CUDA SDK example particles on ubuntu 9.10 x64

./postProcessGL
CUDA SDK example postProcessGL on ubuntu 9.10 x64 (teapot)

CUDA SDK example postProcessGL on ubuntu 9.10 x64 (teapot)

Problems


libxi (Nvidia forum link)

make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common'
In file included from ./../common/inc/paramgl.h:24,
                 from src/paramgl.cpp:19:
./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory
make[1]: *** [obj/release/paramgl.cpp.o] Error 1
make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common'
make: *** [lib/libparamgl.so] Error 2
sudo apt-get install freeglut3 freeglut3-dev libx11-dev mesa-common-dev
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/include/bits/mathinline.h:36: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathinline.h:42: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathinline.h:48: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:442: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
make[1]: *** [obj/release/particleSystem.cu.o] Error 255
make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/src/particles'
make: *** [src/particles/Makefile.ph_build] Error 2

The problem is due to having gcc 4.4 installed rather than 4.3, it is possible to install the older version of this compiler but it is simpler to modify common/common.mk and add the following extra flag (Nvidia forum link):

# Change:
NVCCFLAGS += --compiler-options -fno-strict-aliasing
# To:
NVCCFLAGS += --compiler-options -fno-strict-aliasing --compiler-options -fno-inline

and change the -O2

# Change:
COMMONFLAGS += -O2
# To: 
COMMONFLAGS += -O0

The two remaining errors you may encounter are very similar and arrise from missing libraries:

libxi (Nvidia forum link)

/usr/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
make[1]: *** [../../bin/linux/release/particles] Error 1
sudo apt-get install libxi-dev

libxmu (Nvidia forum link)

/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status
make[1]: *** [../../bin/linux/release/particles] Error 1
sudo apt-get install libxmu-dev libxmu6
Read More

Streaming media from Linux to PS3

I wanted to watch some of the videos that I have on my computer on my playstation 3, so that lead me to search for media server applications. I found out that you could set this up quite easily from within Windows Media Player, however as a linux user I knew there was probably a much better linux based solution available.

After a few minutes of googling, I found a program called Mediatomb. It is avaliable at mediatomb.cc

mediatomb is in the ubuntu repositories, so all that is needed to install it is:

sudo apt-get install mediatomb

All you need to do once it is setup is to open up the config file located at ~/.mediatomb/config.xml
and to add the following below the <server> line

<server>
<protocolInfo extend=”yes”/>

then in the mappings section, add any file formats that you want to be forwarded. In this example .avi and .divx files have been added

<mappings>
<extension-mimetype ignore-unknown=”no”>
<map from=”avi” to=”video/x-divx”/>
<map from=”divx” to=”video/x-divx”/>

Once this is all done, you can run mediatomb, and it will give you an output like the following:

MediaTomb UPnP Server version 0.11.0 – http://mediatomb.cc/

===============================================================================
Copyright 2005-2008 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
MediaTomb is free software, covered by the GNU General Public License version 2

2008-08-13 23:46:19 INFO: Loading configuration from: /home/mat/.mediatomb/config.xml
2008-08-13 23:46:19 INFO: Checking configuration…
2008-08-13 23:46:19 INFO: Setting filesystem import charset to UTF-8
2008-08-13 23:46:19 INFO: Setting metadata import charset to UTF-8
2008-08-13 23:46:19 INFO: Setting playlist charset to UTF-8
2008-08-13 23:46:19 INFO: Configuration check succeeded.
2008-08-13 23:46:19 INFO: Initialized port: 49152
2008-08-13 23:46:19 INFO: Server bound to: 192.168.0.4
2008-08-13 23:46:20 INFO: MediaTomb Web UI can be reached by following this link:
2008-08-13 23:46:20 INFO: http://192.168.0.4:49152/

The last line shows the information of use, using the ip address you can login to the web interface for the mediatomb server, from there you can add the folders you wish to be shared.

Then on the PS3 or whatever device you are using, you should be able to access the files that you have shared. My PS3 automatically found the server but also had the option to scan for media servers. The only problem with the playstation is that it will refuse to play some files, but most of the videos I tried worked.

Conclusion: Pretty dam cool

The following link is a slightly better guide, than my brief overview http://www.freesoftwaremagazine.com/columns/upnp_mediatomb_ps3_and_me
P.S. Media tomb also shares images and music files etc… forgot to mention it.

Read More