📄 index.html
字号:
<html><head><title>Example of video image enhancement</title></head><body bgcolor="#ffffff" vlink="#ff0000"><h2>Example of video image enhancement</h2><hr><center><img src=badfields.png></center><p>Attempting to enhance video images can be very frustrating. While avideo image may have been sampled and digitized at, say, a resolutionof 576x768 pixels (the nominal PAL standard size) its underlyingresolution is probably no more than about 250x300 pixels. This isfixed by the television transmission standard. Video images areinterlaced - one field of the image displayed in the even numberedrows of the image and the other field in the odd numbered rows. Thesetwo fields are recorded and refreshed 1/50th of a second apart. Thus acomplete<i>frame</i> is refreshed every 1/25th of a second. If there is motionin the scene the interlacing of fields recorded at different instantsin time will result in a fringing effect around the boundary of theobject. If the video is recorded in, say, 12 hour mode the intervalbetween fields will be much greater making this effect worse.<center><img src=smfields.png></center><p>The other thing to note is that the two fields are recorded tovideo tape by separate heads on opposite sides of the recording drum.The quality and characteristics of the two recorded fields can bequite different. The magnetic flux generated by these two heads canbe different, and differing amounts of dirt may have accumulated overthe heads. Accordingly you often have to consider the image as beingcomposed of two very separate images even if there is no motion in thescene.<center><img src=smvideohead.png></center><p>Deinterlace the image using the following call to<tt>extractfields</tt>. This function extractes the two fields fromwith the image, one made up of the odd numbered rows, and the otherfrom the even rows. Here we have requested that missing rows arefilled in by interpolating the rows above and below.<pre> >> [f1,f2] = extractfields(im,'interp');</pre><p>We now have two images that are clearer than the original and youcan see how different the two fields can be. Note also the differentpositions of the people in the two fields.<p><center><table><tr><td><img src=f1.png> <td> <img src=f2.png><tr><td align=center>Field 1 <td align=center>Field 2</table></center><p>As you can see above the chrominance (colour) information can berather poor, however the luminance information (grey values) can be OKand it is often useful to convert colour images to greyscale.<pre> >> gf1 = rgb2gray(f1); >> gf2 = rgb2gray(f2);</pre><p><center> <table><tr><td><img src=gf1.png> <td> <img src=gf2.png><tr><td align=center>Field 1 <td align=center>Field 2</table> </center><p>If you want to attempt some noise removal it is best to deinterlacethe images <i>without</i> filling in missing rows by interpolation.Simply extract the half height images. If we were to interpolate themissing rows these would have different noise characteristics relativeto the non-interpolated rows. This would interfere with the denoisingprocess.<p>Note also that when we convert the images to grey scale image theextracted fields are cast to type <tt>double</tt> beforehand. Thisensures the final grey values are floating point values and not rounded integer values. Thus, we preserve as much of the imageinformation as possible. Note that we divide the cast image values by255 to provide floating point values between 0 and 1 which is what<tt>rgb2gray</tt> seems to want if you pass data of type<tt>double</tt> to it.<pre> >> [hf1,hf2] = extractfields(im); >> ghf1 = rgb2gray(double(hf1)/255); >> ghf2 = rgb2gray(double(hf2)/255);</pre><p><center> <table><tr><td><img src=ghf1.png> <td> <img src=ghf2.png><tr><td align=center>Field 1 <td align=center>Field 2</table> </center><p>Try wavelelet denoising with the following parameters (see the helpinfo for <tt>noisecomp</tt> to see what these are)<pre> >> k = 2; >> nscale = 7; >> mult = 2.5; >> norient = 6; >> softhard = 1; >> nf1 = noisecomp(ghf1, k, nscale, mult, norient, softhard); >> nf2 = noisecomp(ghf2, k, nscale, mult, norient, softhard);</pre><p><center> <table><tr><td><img src=nf1.png> <td> <img src=nf2.png><tr><td align=center>Denoised Field 1 <td align=center>Denoised Field 2</table> </center><p>Finally fill in the missing rows by interpolation and manuallyadjust the contrast and saturation levels to taste. <pre> >> ff1 = interpfields(nf1); >> ff2 = interpfields(nf2);</pre><p><center> <table><tr><td><img src=finalf1.png> <td> <img src=finalf2.png><tr><td align=center>Denoised and contrast adjusted Field 1 <td align=center>Denoised and contrast adjusted Field 2</table> </center><p>While the final result may be an improvement on the original itstill leaves a lot to be desired. Over the years I have come to theconclusion that surveillance video, even under ideal conditions, isuseless for identification purposes. The inherent resolution is justtoo low. <p>Indeed I have done some basic experiments by placing a standardoptometrist's eye chart in front of some CCD cameras. Typically thecamera's 'eye sight' would only be classed as being 6/24 to 6/48vision (20/80 to 20/160 in imperial). What this means is that ifsomeone with normal sight can see something at 48 metres, the camerawould have to be placed only 6 metres away to see the same detail.This is not unexpected, after all the human eye has about 100 million lightsensitive cells and a CCD camera has less than half a million pixels.<p>Good Luck!<hr></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -