You are on page 1of 5

Image processing

As normally defined, image processing is about the conversion of one image into another.
Sometimes this is carried out to improve the image in some way—as happens during the
removal of noise—and sometimes it is carried out as part of the process for analysing the
image, e.g. to find what objects it contains.

Methods of image processing


Pixel operations
a new image is produced by processing each pixel in some way, and the result is placed at the
corresponding location in the new image: usually the same processing technique is employed at
each pixel location. For example, we could double the inteAll routines which adjust the intensity
of each pixel in the image according to a common rule are termed pixel operations
this category clearly includes operations such as copying images, inverting image intensities,
stretching image intensities to improve contrast, and making images darker or lighter by
decreasing or increasing the grey level values. It also includes the widely used operation known
as thresholding, in which image regions which are lighter than a certain threshold are made
completely white, and those darker than this level are made completely black and the closely
related binarization operation in which the binary values 0 and 1 are output intensity at each
pixel location in order to make the final image lighter.

Window operations
In contrast with the pixel operations described above are the so-called window operations: these
are rather more complex than pixel operations, but are considerably more powerful. Their
operation takes the following general form which makes use of a window in the input image
centered about the current input pixel
for each pixel in image do
begin
obtain intensity values of pixels in current window;
use these values to compute a new intensity value;
insert new intensity value in output image;
end;

Thresholding
thresholding is widely used to help with the location and demarcation of objects in grey-scale
images. The basic idea is to view objects against a contrasting background so that they have
different sets of intensity values in the input image; in that case it should be possible to select an
intensity threshold which will permit separation to be achieved.

Adaptive thresholding
Perhaps the most obvious method for solving the problem of non-uniform illumination is to
model the background in the absence of any objects, and to subtract the resulting intensity
pattern from that observed when objects are present. In principle, the difference image can then
be analysed and thresholded as outlined above. While this approach can be made to work
reasonably well in constrained situations, for example with known flat objects such as biscuits
on a conveyor, in more complex situations it tends to be plagued by problems such as the
effects of shadows and secondary lighting (i.e. light reflected from one object to another). Thus
a more rigorous approach which determines the thresholding levels from the current image is
required.

INSPECTION IN PROCESSED FOODS


Food safety inspections provide a structured and impartial evaluation process
conducted by regulatory authorities to assess how well food processing facilities adhere
to established safety standards and guidelines.

Defects in processed food can include wide-ranging safety hazards:


chemical, microbiological or physical contamination; improperly sealed
containers or defective packaging; partially cooked or poor temperature
management. These defects may be detected by evaluating color, odor,
and texture of foods, as well as through sampling of products. Defects
are part of the normal process of growing and processing food. When
they rise to "actionable levels" and/or pose a health hazard to the
public, they can trigger a recall.

Important Elements in Food Safety Inspection


1. Cleanliness and Hygiene

Cleaning is the first step to perform in all food preparations. Dangerous microorganisms
from water, soil, people, and animals can stick on ingredients, utensils, equipment, and
hands. You can transfer them from one surface to the other, even with the smallest
contact.

4. Keeping Food at Safe Temperatures

Proper food storage is also a key part of food safety inspection. Ideally, food should be
stored at a temperature above 60 or below 5 degrees Celsius. When storing various
food items in containers, label them with the food names and the dates of storing them.
They will help you in managing safe food storage.

A basic case study: Jaffacake inspection


Jaffacakes are round shallow cakes which are topped by a small pool of jam and covered with
chocolate (see Figure 9.1). When the chocolate has solidified, the products are packed, first into
paper packets and then into boxes. Although from the consumer's point of view the total weight
of product in a packet may be more important than the exact number of cakes included in it, the
size of the individual products is nevertheless crucial: this is because more than about 10%
variation in diameter can result in jamming of the packing machine. Hence product diameter is a
vital inspection parameter. Likewise, product circularity is important. Next, presence, quantity
and placing of the jam must be considered, and it must be checked that the top of the product is
completely covered with chocolate. It so happens that chocolate is a highly expensive
commodity, and most consumers want a fair ration of it. Thus it is vital to provide just enough
chocolate to ensure complete cover, and the inspection system must be sensitive to any
deviation from this criterion. a whole-product quality appearance check has to be included in the
inspection system.

The solution
In the particular application considered, the whole inspection process had to take place at
around 20 products per second, and 100% inspection was required so that quality could be
guaranteed. the algorithms had to be made as simple and effective as possible.
In this respect the only latitude was in the whole-product quality appearance check, where it
would have been preferable to make a specific measure of the textural pattern on the chocolate.
For ease of hardware implementation (and hence cost-effective
implementation), extensive use was made of summation processes, including:
1. summation of pixels representing the product area
2. summation of pixels representing chocolate cover
3. summation of pixels representing dark areas within the chocolate region
4. summation of contributions to the radial intensity histogram
5. summation of contributions to the radial intensity histogram correlation
function.

Image acquisition
In this application, the product line had a continuously moving conveyor, and it was natural to
use a line-scan camera to progressively build up the images. The camera was directly over the
line which was also illuminated from above by a set of four symmetrically placed spotlights. All
algorithms were made sufficiently robust so that exact placement of the lights was not essential
for satisfactory operation, though excessive displacement or failure of a light would result in
lower accuracy in the analysis of the grey- scale intensities on the product. Because of the
problems involved in analysing images containing several products across the width of the
conveyor, some of which might be only partially included in any image, it seemed better to go for
a very high speed single stream of product, even though this is more exacting with regard to
speed of processing.

Product location
This meant that an edge detection-based process was preferable. The boundary tracking
approach also gives rise to problems where two Jaffacakes are in contact, or where a Jaffacake
overlaps a smear of chocolate on the conveyor.
These considerations led to use of the Hough transform (HT) approach for circle centre location.
The idea behind the HT is to build up evidence for a particular solution—in this case for the
presence of a circle with centre at a given location—while ignoring any irrelevant information
pointing to other solutions.
this can be achieved by taking each edge point in the input image and the associated
information on edge orientation, deducing the position where the centre of a circle would be if
the edge were part of the circle boundary, and then accumulating this evidence in the form of a
vote at that location.

Raw material inspection


Cereal grain inspection
Case study: location of dark contaminants in cereals
there are a number of problems, in that shadows between grains, dark patches on the grains,
chaff and other admixture components, together with rapeseeds, appear as false alarms, so
further recognition procedures have to be invoked to distinguish between the various
possibilities.
In this case study we concentrate on monitoring grain for rodent droppings. As indicated above,
these types of contaminant are generally darker than the grain background, but cannot simply
be detected by thresholding since there are significant shadows between the grains, which
themselves often have dark patches.

Application of morphological and non-linear filters to locate rodent droppings

As indicated above, the obvious approach to the location of rodent droppings is to process
thresholded images by erosion and dilation. (Erosion followed by dilation is normally termed
'opening'). In this way, shadows between grains, and discoloration of grains would be eliminated
by the erosions, and the shapes and sizes of the contaminants restored by the subsequent
dilations. Note that the method has been successful in eliminating the shadows between the
grains, but has been decidedly weak in coping with light regions on the contaminant. Hence the
erosion-dilation schema has limited value.

The second approach is to attempt to make good the deficiency of the previous approach by
ensuring that the contaminants are consolidated even if they are speckled or light in places.
Thus an attempt was made to apply dilation before erosion.Even when an additional few
erosions are applied the consolidated shadows do not disappear, and are of comparable sizes
to the contaminants. Overall, the approach is not viable, as it creates more problems than it
solves.

The new approach was to apply a large median filter to the thresholded image, as shown in
Figure 10.1(f). This gives good segmentation of the contaminants, retaining their intrinsic shape
to a reasonable degree, and suppresses the shadows between grains quite well. In fact the
shadows immediately around the contaminants enhance the sizes of the latter in the median
filtered image, while some shadows further away are consolidated and retained by the median
filtering. It was found that a reasonable solution is to perform a final erosion operation this
eliminates the extraneous shadows and brings the contaminants back to something like their
proper size and shape. Overall, the median filtering-erosion schema gave easily the greatest
fidelity to the original contaminants, while being particularly successful at eliminating other
artefacts.

You might also like