June 17, 2010

News and updates

Some users expressed the need for longer evaluation time, so I extended the trial period for Pixcavator from 10 to 30 days. Also, for the users who are having trouble with installation and registration, for a number of reasons (firewall etc), please try the Student Edition. It requires no installation and can be freely copied.

The site, Computer Vision Primer, has been growing and has reached 379 pages with 1,018 illustrations. In particular, the transcription of the Vector Calculus course that I taught 2009/10 has recently started. Two lecture sets are finished (about 20% of the total) and the third is on the way.

The NSF summer REU program has started. These are the two projects that I will supervise:

June 10, 2010

Quality of soldering: an image analysis example

Q: “Interested in assessing whether your software could be used to determine the quality of a solder joint… Joint is composed of an aluminum tube and a copper pipe… The area of the copper pipe that overlaps or contacts the aluminum tube is the area that needs assessment. Would like to determine what percent of this area has a solder coating. The solder is a zinc78%/alum22% alloy… the copper pipe section could be flattened to a greater degree if this to would help with accuracy.”

As it has been suggested, it is a good idea to outline what is to be measured manually so that we can see if automatic analysis produces reasonable results:

In the screenshot the two numbers are at the top.

The area inside the red contour (i.e., inside your red line) is 140,582 pixels.
The area inside the green contour (i.e., gray region) is 106,787 pixels.

So the proportion of gray inside the red line is
106,787 / 140,582 = 76%.

By moving the sliders one can make the contours to fit better and improve the accuracy.

More here

May 31, 2010

Edge detection in image analysis

Filed under: image processing/image analysis software, mathematics — Peter @ 12:18 pm

One of the most basic methods of analyzing gray scale image is to find the pixels area of high contrast. These areas are likely to be where an object ends and the the background begins.

More precisely, these are the areas where the change of the gray – for light to dark or dark to light – is the fastest. Then one needs a threshold so that all pixels where this change is higher that this number are considered “edges”:

Mathematically, we deal with

 the rate of change of the gray level
             = the gradient of the gray scale function.

(In fact, one only needs the norm of the gradient.) Computation of the derivative however in the digital (discrete) context is a challenge as it is severely affected by noise. Consider the image of coins and its version with noise added.

Image:coins.jpg Image:coins noise.jpg

If now edge detection is run, the results are unsatisfactory – too many irrelevant contours. 

Image:coins noise edge detect.jpg 

Of course it may be possible to filter out the smaller contours. In this particular case it’s impossible because they are parts of large ones. In fact they form large fractal-like structures. This is the reason why edge detection may have to be preceded by smoothing of the image.

Read more

May 26, 2010

Nested boundaries in image analysis

Filed under: image processing/image analysis software, mathematics — Peter @ 6:25 pm

Under Review summary (in Output tab) Pixcavator shows the data about the objects found in the image. Pixcavator displays the total area of dark and the total area of light objects – as percentages of the total size of the image (second row).

Under certain circumstances though, the contours of the same kind may be “nested” and, as a results, these percentages may be wrong or even above 100%.

Example below (measuring grass coverage): the dark shows the 151% coverage.

The number is certainly meaningless (there will be a warning about that in the next release).

Why is it above 100%? Because the area is covered several times by these objects. If you click “Color objects”, you’ll see one large object with red contour and many others inside of it.

What happens is easier to see in this simpler image:

The results of image analysis may considered “good” here, but only in the sense that we have captured some 3D information. In general, we restrict our attention to image with mostly 2d information (see Images appropriate for analysis).

What exactly happens here? The way Pixcavator’s sliders operate is this: the contour is allowed to grow until its size (or contrast) is over the bound set by the corresponding slider. Practically, this means that each potential contour C is compared to a contour C’ corresponding to the previous gray level. Then, if C passes but C’ does not then C is plotted.

For more, see Nested boundaries.

May 10, 2010

Measuring vegetation coverage: an image analysis example, continued

In the last post I discussed some issues you encounter when you want to evaluate vegetation coverage based on image analysis.

Now, the area covered should be just a step towards what we are really interested in – the height of the vegetation (or volume, even better).

Let’s consider how one can compute the height of vegetation from a digital image. The idea is very simple:

 the average height = the area / the width.

Consider now what we see in the image.

Views from a side (vegetation in green) and from above:

Image:vegetation view from a side.jpg Image:vegetation view from above.jpg

Assumptions:

  1. The board is a square and its dimensions are known.
  2. The board is vertical (otherwise it’s impossible to know where the bottom is).
  3. The bottom of the board is horizontal on the horizontal (along the board) ground.
  4. The field of view of the camera includes the edge of the vegetation and the top of the board.

Then, the average height computed as below is independent from:

  • the deviation of the angle of the camera from the horizontal,
  • the distance from the camera to the board,
  • the height of the position of the camera above the ground.

The measurements (the image in black, the bottom of the board in red):

Image:vegetation measurements.jpg

These come from image analysis:

 A = the area of the board visible above the vegetation (sq pixel),
 W = the width of the board (pixel).

This is known:

 S = the length of the side of the board (in).

Then average height of the vegetation above the ground (in) is:

  H = S * (1 - A / W2).

Computations here.

April 30, 2010

Measuring vegetation coverage: an image analysis example

Q. From these images “we want to derive the area of the board covered by plant material to serve as an index of plant density.” We would like to “develop .. a simple protocol for estimating area-covered by plant material in our digital images with Pixcavator. “

This would be hard to accomplish with images similar to these. To capture the vegetation effectively, one has to separate it from the background. Then, ideally, the latter would have to either uniformly lighter or uniformly darker than the former (see Gray scale images). The light/dark squares make the task very challenging.

Instead, one can digitally isolate the squares within each image, so that the area covered by vegetation can be estimated from a set of sub-images (i.e., individual squares) with uniform background colors:

In the screenshot, the colored areas are the complement of the vegetation. Their total area is 64.95%, so the vegetation takes the rest, 35.05%.

Blue gives a good separation of the background. 

More

March 5, 2010

ImageJ vs Pixcavator: update

Filed under: image processing/image analysis software, news — Peter @ 11:59 am

Two years ago I had a post here (follow-up) where I dared to compare these two programs. The reaction was unfavorable. The ImageJ ticket quoted below seems to indicate that there has been a slight shift.

Wayne [Rasband] had an idea for a command called “Analyze Image” that combines filtering, background correction, segmentation, particle analysis, etc. It would work something like the closed-source, Windows-only  Pixcavator program. As Wayne said, “It would not be an easy thing to create but it would be very popular with ImageJ users”. 

I agree.

March 3, 2010

Update on CHomP, homology software

Filed under: image processing/image analysis software, mathematics, news — Peter @ 7:33 pm

Prof. Marian Mrozek  was kind enough to inform me about the coming update of CHomP in his email that I quote below:

The power of the software comes from much newer algorithms. Some of them are described in the papers:

  • M. Mrozek, P. Pilarczyk, N. Zelazna, Homology algorithm based on acyclic subspace, Computers and Mathematics with Applications, 55 (2008), 2395 –2412.
  • M. Mrozek, B. Batko, Coreduction homology algorithm, Discrete and Computational Geometry, 41 (2009), 96-118.
  • M. Mrozek, Cech Type Approach to Computing Homology of Maps
    Discrete and Computational Geometry, accepted
  • and a few more which are just in preparation.

We just finish[ed] writing a new, much stronger version of the software which will accept not only cubical complexes but also simplicial complexes and general CW complexes and will produce broader output, in particular homology generators, homology maps and persistence intervals for filtered complexes.

The new version of our software at first will be available from the webpage
of our CAPD group at Jagiellonian University, Krakow, Poland:
http://capd.ii.uj.edu.pl/.

Take a look also at our Homology Software page.

February 26, 2010

Analysis of RGB channels in color images

Filed under: image processing/image analysis software, updates — Peter @ 12:46 pm

 

RGB stands for Red, Green, and Blue. These are the “channels” in a color image. Each pixel has 3 numbers between 0 and 255 assigned to it.

  • (255,0,0) red,
  • (0,255,0) blue,
  • (0,0,255) green,
  • (255,255,0) yellow,
  • (255,0,255) magenta,
  • (0,255,255) cyan,
  • (g,g,g) gray, for any g,
  • (0,0,0) black,
  • (255,255,255) white

Every color image has three color channels – red, green and blue – and the image features you are after may be more pronounced with respect to one of them.

The channel-by-channel analysis allows one to consider each channel of the color image as a separate gray scale image and analyze them as needed. In Pixcavator just click a button in the Analysis tab for the channel you want.

In the example below, the circles are of pure red, green, and blue. As a result, the red circle which is (255,0,0) becomes 255 in the red channel. But 255 is equivalent to white in this gray scale image. So the red circle disappears in the red channel. Similarly, the green circle will disappear if you choose the green channel, etc.

This option is important for some applications such as microscopy. Different features are sometimes better revealed in different channels. Below is the original image with two clear, to the human eye, features: red walls and green “cells”.

Image:Epithelial-cells.jpg

Read about analysis of this image here: http://inperc.com/wiki/index.php?title=RGB_channels.

February 17, 2010

Measuring seedling area: an image analysis example

Q: We need to “measure all the seedlings area (by dividing by the number of them I can get indication to their area and structure, and other parameters I can get)… The area covered is 80*80cm.”

The screenshot shows the results of my experiment. Here the red contours surround the darker areas (vegetation) and green surround the lighter areas inside. So, the total coverage is 60 – 9 = 51%. Unfortunately, I was unable to separate the seedlings from the rest of the vegetation.

There is also work with ecological researchers to measure vegetation coverage but mostly with horizontal shots.

Other examples of image analysis

February 10, 2010

Hose measurements: an image analysis example

Q: We “need to verify the internal diameter, external diameter and the wall thickness between the ID, OD and the reinforcement yarn. One issue we have is that the wall is not always concentric. We have a minimum wall thickness specification so we would like to measure the wall thickness at the thinnest point to determine if it meets our spec or not.”  

I analyzed one of the images. I found fairly good contours that capture the inner (red) and outer (green) borders of the hose with the settings that you can see in the screenshot. The measurements for this contours can be seen in the Pixcavator’s output table.

The area inside the red contour is 130,966. Assuming this is a circle, the area is equal to π*R2, so the radius is

 R = √(130,966/3.14) = 204 pixels.

Then the external diameter is 408 pixels (one would have to do calibration at this point to convert to inches).

The area inside the green contour is 96,595. Assuming this is a circle, the radius is

 R = √(96,595/3.14) = 175 pixels.

Then the internal diameter is 350 pixels.

This suggests that the thickness of the wall should be 204-175=29 pixels. This is the average thickness of a ring with these measurements. To verify this number one can drop the assumption that these are circles and use the perimeters of the contours taken from the output table. Then

 average thickness
   = (area of the wall)/(average perimeter)
   = (130,966-96,595)/((1,547+1,283)/2)
   = 24 pixels.

A similar computation is presented here: Wall of a blood vessel.

Other examples of image analysis

January 31, 2010

Pixcavator 5.0 released

These are the new features in version 5.0.

  • Your choice of settings in the Output tab (the position of the sliders) is preserved when you load a new image to analyze.
  • Your choice of color channels in the Analysis tab is preserved when you load a new image to analyze. With these two the user can apply the same settings to a sequence of images if they are similar in nature. So, we get as close as possible to bulk processing without actually creating this complex feature.
  • Luminosity is a new color channel that you can choose. It is computed as a combination of the red, green, and blue values: 0.299*R + 0.587*G + 0.114*B. There are four channels now.
  • “Display channel” is a new option in the Analysis tab (just like the one in the Output tab). If you have chosen to shrink the image, the shrunken version is shown. This way you can preview all channels and decide which is the best – before committing to time consuming analysis.
  • The “Help” menu provides now the links to the help pages of this wiki. The user’s guide and the license are still provided with the program; they are to be found in the “Pixcavator” folder on your hard disk.
  • The actual processing time is shown when it’s done, and a beep is produced – but only if processing has taken more than 5 seconds.
  • Up to 2000 contours are now shown on the image and their statistics is also displayed. When there are more than 2000 contours, neither is shown.
  • A few bugs have been fixed, some remain.

Download here.

January 13, 2010

Cluster size effects in molecular beam scattering: research that uses Pixcavator

Filed under: image processing/image analysis software, news — Peter @ 12:37 am

Image:Gold.JPG

A new research paper that uses Pixcavator:

Adsorption Dynamics of CO on Silica Supported Gold Clusters: Cluster Size Effects in Molecular Beam Scattering Experiments by E. Kadossov, U. Burghaus (Department of Chemistry, Biochemistry, and Molecular Biology, North Dakota State University), link, published in Catalysis Letters.

From the paper:

“We report on particle size effects in the adsorption dynamics (gas-surface energy transfer) of CO, studied by molecular beam scattering… the effect of supported nano-size gold metal clusters on gas-surface energy transfer processes (adsorption dynamics)… For the statistical analysis, commercial imaging analysis software (Pixcavator IA 4.2) was used.”

There are nine, to the best of my knowledge, research papers that used Pixcavator and gave credit.

January 11, 2010

Pixcavator Single Image Edition

This edition is a version of Pixcavator that comes with a preloaded image. Which means that it’s not really a single program but many – one for each image.

It is a single file “exe” program that does not require any installation. As such it can be used as an alternative to screenshots, for demos etc.

This edition has all the features of the standard edition except for image processing tools. This way you can choose different color channels for your analysis, experiment with the sliders, and save your work.

Most of image analysis examples will soon have links to the corresponding files. For a start, try to run these two examples:

In FF: choose “Save”, then “Run”. In IE: just choose “Run”.

We will also be able to create such files as a service to our customers.

January 5, 2010

Immunohistochemistry on lung biopsies: an image analysis example

Filed under: image processing/image analysis software, updates — Peter @ 3:24 pm

Q: “Immunohistochemistry was performed on my lung biopsies and now I have to analyse my staining. I would like to get a value for the colour intensity of my staining. … In the output of Pixcavator a mean value for grayness is given, but I don’t think all my brown staining is measured. Even if I adjust the threshold for size, not all objects are captured with a red or green contour.  ”

1. The difference in gray isn’t more pronounced because what is displayed is the average not the weighted average. So, one large dark object is outweighed by smaller, lighter ones. If you hover over objects (or look at the table) one at a time, you see a more noticeable difference. You can also save the data as a spreadsheet and compute the weighted averages. Certainly, if the difference is still too small, contrast enhancement would help.

2. It’s better to choose the green channel (or blue) than red. The features are much more distinct. If you click on “Display channel”, you’ll see the difference.

3. You are interested in dark objects only, red contours. So, the light ones only skew the averages. Click “Unmark light”.

4. The “Size” slider does not seem to reveal the features quite well. I used the simple thresholding instead, i.e., the “Intensity, dark” slider.

A screenshots is below. (This example may be somewhat similar: Measuring staining in the liver.)

More analysis here… 

Other examples of image analysis

Next Page »