Median Filter is implemented with Dsp TMS320C6745 hardware setup and software program in C code as well as used MatLab too. Whereas median filter are used wide range of application in Digital Image Processing. The main Feature of Median Filter is used to reduce the salt and pepper noise in Digital image.
The main feature of DSP processor is their 32 bit floating point, processing speed and external memory interface. This brings very fast execution and implenting the algorithm in c code without changing the hardware setup.
The Main tools which we used are Code Composer Studio v4, TYRO TMS320C6745 kit and MATLAB.
The TMS320C6745 32 bit floating point processor kit was used in this project to achieve a speed and accuracy. Their pheriperal UART is used to transmit the pixel to MATLAB.
The Digital Signal Processor TMS320C6745 of Texas Instrument is used for implementing the Median Filter. TMS320C6745 is a Digital Signal Processor from the C6000 Platform and members of the TMS320C67x™ DSP generation, are highly integrated, high-performance solutions for demanding applications.
The TYRO TMS320C6745 EVALUATION BOARD is specially desgined for developers in dsp field as well as beginners. The C6745 kit is designed in such way that all the possible features of the DSP will be easily used by the everyone.
The kit supports in Code Composer Studio v4 and later, with XDS100 v1 USB Emulator which is done USB port.
Image processing is a very important field within industrial automation, and more concretely, in the automated visual inspection. For example, automatically analyzing predetermined features of manufactured parts on an assembly line to look for defects and process variations. In these applications, the main challenge normally is the requirement of real-time results.
On the other hand, in many of these applications, the acquired images must pass through a stage of image preprocessing in order to remove distracting and useless information from the images. For example, the existence of impulsive noise in the images is one of the most habitual problems.
It is the use of Computer algorithms to perform some process on Digital Images. Here Computer Algorithm denotes the finite mathematical calculation instructions. Histogram, Co-Variance, Mean, Median Filter, Standard Deviation these are all the some basic calculation process in DIP. Classification, Resizing, Extraction, Recognition these are all the some basic Process.
The following three are playing a major in our project:
The TYRO TMS320C6745 EVALUATION BOARD have one great advantage is 256 Mb SDRAM is interfaced through EMIFB External Memory Interface B peripheral. This interface will use to store a huge data(pixel) so it helping us to do image processing in this kit.
The RS232 9 pin serial communication is interfaced through UART0 Serial Interface peripheral. This interface will use to communicate between the kit and the Matlab.
The Code Composer Studio v4 will help us to do the source code for TMS320C6745 to implement the median filter algortihm and to debug.
The MatLab R2010a will help us to see images on GUI Window from processor uart through pc.
256 Mega Byte SDRAM is interfaced with TMS320C6745 address and data lines. SDRAM will able to read the data from CPU and able to write the data to CPU. SDRAM can accept one command and transfer one word of data per clock cycle. Typical clock frequencies are 100 and 133 MHz. Chips are made with a variety of data bus sizes (most commonly 4, 8 or 16 bits)
All commands are timed relative to the rising edge of a clock signal. In addition to the clock, there are 6 control signals, mostly active low, which are sampled on the rising edge of the clock:
CKE Clock Enable. When this signal is low, the chip behaves as if the clock has stopped. No commands are interpreted and command latency times do not elapse. The state of other control lines is not relevant. The effect of this signal is actually delayed by one clock cycle. That is, the current clock cycle proceeds as usual, but the following clock cycle is ignored, except for testing the CKE input again. Normal operations resume on the rising edge of the clock after the one where CKE is sampled high.
Put another way, all other chip operations are timed relative to the rising edge of a masked clock. The masked clock is the logical AND of the input clock and the state of the CKE signal during the previous rising edge of the input clock.
/CS Chip Select. When this signal is high, the chip ignores all other inputs (except for CKE), and acts as if a NOP command is received.
DQM Data Mask. (The letter Q appears because, following digital logic conventions, the data lines are known as "DQ" lines.) When high, these signals suppress data I/O. When accompanying write data, the data is not actually written to the DRAM. When asserted high two cycles before a read cycle, the read data is not output from the chip. There is one DQM line per 8 bits on a x16 memory chip or DIMM.
/RAS Row Address Strobe. Despite the name, this is not a strobe, but rather simply a command bit. Along with /CAS and /WE, this selects one of 8 commands.
/CAS Column Address Strobe. Despite the name, this is not a strobe, but rather simply a command bit. Along with /RAS and /WE, this selects one of 8 commands.
/WE Write enable.
UART (Universal Asynchronous Receiver Transmitter) are one of the basic interfaces which provide a cost effective simple and reliable communication between one controller to another controller or between a controller and PC.
Usually all the digital ICs work on TTL or CMOS voltage levels which cannot be used to communicate over RS-232 protocol. So a voltage or level converter is needed which can convert TTL to RS232 and RS232 to TTL voltage levels. The most commonly used RS-232 level converter is MAX3232.
This IC includes charge pump which can generate RS232 voltage levels (-10V and +10V) from 5V power supply. It also includes two receiver and two transmitters and is capable of full-duplex UART/USART communication.
RS-232 communication enables point-to-point data transfer. It is commonly used in data acquisition applications, for the transfer of data between the microcontroller and a PC.
The voltage levels of a microcontroller and PC are not directly compatible with those of RS-232, a level transition buffer such as MAX3232 be used.
We now want to send a pixel values from th program in C6745 Evaluation Board by using uart to MatLab.
It is often desirable to be able to perform some kind of noise reduction on an image or signal. The median filter is a nonlinear digital filtering technique, often used to remove noise. Such noise reduction is a typical pre-processing step to improve the results of later processing (for example, edge detection on an image).
Median filtering is very widely used in digital image processing because, under certain conditions, it preserves edges while removing noise
Median filter is the nonlinear filter more used to remove the impulsive noise from an image. Furthermore, it is a more robust method than the traditional linear filtering, because it preserves the sharp edges.
Median filter is a spatial filtering operation, so it uses a 2-D mask that is applied to each pixel in the input image. To apply the mask means to centre it in a pixel, evaluating the covered pixel brightnesses and determining which brightness value is the median value.
Figure presents the concept of spatial filtering based on a 3x3 mask, where I is the input image and O is the output image.
The main idea of the median filter is to run through the signal entry by entry, replacing each entry with the median of neighboring entries.
The pattern of neighbors is called the "window", which slides, entry by entry, over the entire signal. For 1D signals, the most obvious window is just the first few preceding and following entries, whereas for 2D (or higher-dimensional) signals such as images, more complex window patterns are possible (such as "box" or "cross" patterns).
Note that if the window has an odd number of entries, then the median is simple to define: it is just the middle value after all the entries in the window are sorted numerically. For an even number of entries, there is more than one possible median
The median value is determined by placing the brightnesses in ascending order and selecting the centre value. The obtained median value will be the value for that pixel in the output image.
Figure shows an example of the median filter application, as in this case, habitually a 3x3 median filter is used.
we respect your privacy.