Архитектура Аудит Военная наука Иностранные языки Медицина Металлургия Метрология
Образование Политология Производство Психология Стандартизация Технологии


Homogeneous Point Operations



10.2.1 Defi nitions and Basic Properties

If a point operation is independent of the position of the pixel, we call it a homogeneous point operation and write

Gm'  n = P (Gmn).                                                 (10.3)

A point operation maps the set of gray values onto itself. Generally, point operations are not invertible, as two diff erent gray values may be mapped onto one. Thus, a point operation generally results in an ir- recoverable loss of information. The point operation


.P (q) =
0    q< t Q − 1 q ≥ t


 

,                                (10.4)


for example, performs a simple global threshold operation. All gray val- ues below the threshold t are set to zero (black), all above and equal to the threshold to 255 (white). Consequently, this point operation cannot be inverted. An example for an invertible point operation is image nega- tion. This operation computes an image with an inverted gray scale as with a photographic negative according to

PN(q) = Q − 1 − q.                                             (10.5)

The inverse operation of a negation is another negation:

.    Σ
PN PN(q)  = Q − 1 − (Q − 1 − q) = q.                                 (10.6)

Another example of an invertible point operation is the conversion be- tween signed and unsigned representations of gray values (Section 2.2.5).

 




Look-up Tables

×
The direct computation of homogeneous point operations according to Eq. (10.3) may be very costly. This is demonstrated by the following example. The 14-bit gray scale of a 1024 1024 image from a high- resolution CCD camera is to be presented in an 8-bit logarithmic gray


10.2 Homogeneous Point Operations                                             247

 

scale covering 4.3 decades from 1 to 16 383. The following point opera- tion performs this conversion:

 

P (q) = 59.30 lg q                                              (10.7)

×
A straightforward implementation would require the following opera- tions per pixel: an integer to double conversion, computation of the logarithm, multiplication by 59.30, and a double to 8-bit integer conver- sion. All these operations have to be repeated over a million times for a 1024 1024 image.

The key point for a more effi cient implementation lies in the obser- vation that the defi nition range of any point operation consists of only a limited number of Q quantization levels. For the 14-bit to 8-bit loga- rithmic conversion, we have at most 16 384 diff erent input values. This means that most of the one million computations are just repeated, on average 64 times. We can avoid the unnecessary repetition by precalcu- lating P (q) for all 16 384 possible gray values and storing the computed values in a 16 384-element table. Then, the computation of the point operation is reduced to a replacement of the gray value by the element in the table with an index corresponding to the gray value.

Such a table is called a look-up table or LUT. Hence, homogeneous point operations are equivalent to look-up table operations. Look-up ta- bles are more effi cient the smaller the number of quantization levels. For standard 8-bit images, the tables contain just 256 values. But it is still effi cient in most cases to use 65 536 entry look-up tables with 16-bit images.

In most image processing systems and frame grabbers, look-up ta- bles are implemented in hardware. There are two possible places for look-up tables on frame grabber boards, as illustrated in Fig. 10.1. The input LUT is located between the analog-digital converter and the frame buff er. The output LUT is located between the frame buff er and the digital-analog converter for output of the image in the form of an analog video signal, e. g., to a monitor. The input LUT allows a point operation to be performed before the image is stored in the frame buff er. With the output LUT, a point operation can be performed and observed on the monitor. In this way, we can interactively perform point operations without modifying the stored image. Many modern frame grabbers no longer include a frame buff er. With the advent of fast peripheral bus sys- tems (such as the PCI bus with a peak rate of 132 MB/s, see Section 1.7), digitized images can be transferred directly to the PC memory (Fig. 10.2). With such a frame grabber, image display is performed on the graphics board of the computer. Consequently, the frame grabber includes only an input look-up table.

The use of input LUTs is limited. Nonlinear LUT functions lead to missing gray values or map two consecutive values onto one (Fig. 10.3).


248                                                                                               10 Pixel Processing

 

Input LUTs
A/D Converter
prog. Offset/Gain
Video Inputs

1

2

 

 


Optional Sync Inputs

Optional Sync Outputs


 

    Frame Memory 1K x 512 Bytes
DACs                           LUTs


Internal Timing Signals


 

Monitor


Red             R

            Green

            (Sync)          G

Blue             B


R G B

 

Host Data Bus


 

Figure 10.1: Block diagram of the PCVISIONplus frame grabber from Imaging Technology, Inc. Look-up tables are located between the A/D converter and frame buff er (input LUT) and the frame buff er and display (output LUT).

 

In this way, artifacts are introduced that yield enhanced errors in sub- sequent processing such as the computation of mean values and edge detection. It is obvious that especially the steepness of edges and the accuracy of gray value changes are aff ected.

Input LUTs would be valuable also for nonlinear point operations if the 8-bit input values were mapped to higher precision output values,

e. g., 16-bit integers or 32-bit fl oating point numbers. Then rounding errors could be avoided. At the same time, the gray levels could be converted into a calibrated signal, e. g., a temperature for an infrared camera. Unfortunately, such generalized LUTs are not yet implemented in hardware. However, it is easy to realize them in software.

In contrast to the input LUT, the output LUT is a much more widely used tool, as it does not change the stored image. With LUT operations, we can also convert a gray value image into a pseudo-color image. Again, this technique is common even with the simplest frame grabber boards (Fig. 10.1). Not much additional hardware is needed. Three digital-analog converters are used for the primary colors red, green, and blue. Each channel has its own LUT with 256 entries for an 8-bit display. In this way, we can map each individual gray value q to any color by assigning a color triple to the corresponding LUT addresses r (q), g(q), and b(q).


10.2 Homogeneous Point Operations                                             249


VIDIN(0: 3)


CAM_CTRL_0.. 4

5


    PCI
Offset/Gain Control

M        A          LUT      8                                  32

X           C
U        D        256x8


Ext. Clock

Ext. Trigger

HSYNC CVSYNC


 

Clock Generator

Opto Decoupler

Sync Generator


 

PCI

Controller


M           CAM_CTRL_0 U

X

Figure 10.2: Block diagram of the PCEYE_1 frame grabber from ELTEC Elek- tronik GmbH as an example of a modern PCI bus frame grabber without a frame buff er. The image data are transferred in realtime via direct memory access (DMA) to the memory of the PC for display and further processing.

 

Formally, this is a vector point operation

 r (q) 

         
P (q) =  g(q)   .                                      (10.8)

b(q)

 

When all three point functions r (q), g(q), and b(q) are identical, a gray tone will be displayed. If two of the point functions are zero, the image will appear in the remaining color.

 


Поделиться:



Последнее изменение этой страницы: 2019-05-04; Просмотров: 273; Нарушение авторского права страницы


lektsia.com 2007 - 2024 год. Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав! (0.027 с.)
Главная | Случайная страница | Обратная связь