Hi I have to design a FIR filter with very steep transition at cutoff and high stop ban attenuation. FIR bcoz I need linear phase. I have matlab available. Fdatool is useless since its FIR dont have a good transition. In literature search I came by papers talking about Sharp transition FIR`s using Frequency response masking and multirate filters. I wanted to know if someone has any experience with these filters ? I am going to try to implement these and wanted to know what issues/problems I can face and are these papers claims any good. If you also know of some technique for implementing sharp transition FIR`s with low number of coeff`s let me know. Also if you know some material/book that might help me with this point it to me. thanks in advance. Any information relavent or irrelavant is welcome. Gaurav
Design of FIR filter with Sharp Transition and High Stop Band Attenuation
Started by ●January 18, 2006
Reply by ●January 18, 20062006-01-18
"gaurav811" <gaurav811@gmail.com> wrote in message news:EPmdnVQGUJPjQ1PeRVn-rA@giganews.com...> Hi > > I have to design a FIR filter with very steep transition at cutoff and > high stop ban attenuation. FIR bcoz I need linear phase. I have matlab > available. Fdatool is useless since its FIR dont have a good transition.It's only as good as it's user.> In literature search I came by papers talking about Sharp transition FIR`s > using Frequency response masking and multirate filters. I wanted to knowif> someone has any experience with these filters ? I am going to try to > implement these and wanted to know what issues/problems I can face and are > these papers claims any good.What are your specs. Very steep isn't much of a spec.> If you also know of some technique for implementing sharp transition FIR`s > with low number of coeff`s let me know. Also if you know somematerial/book> that might help me with this point it to me.Sharp transition FIRs and low number of coeffs don't go together. You might be able to get *sharper* transitions given a certain number of coeffs using some creative filter design but if you are looking for an order of magnitude improvement, you are out of luck. Multi-rate techniques help achieve a fairly sharp cutoff using oversampling without putting too much of a computing burden (caused by a high number of coeffs) but this involves designing multiple filters. There are several references that you can use to learn about multi-rate filters - I'd start with http://dspguru.com/info/faqs/mrfaq.htm Cheers Bhaskar
Reply by ●January 18, 20062006-01-18
gaurav811 wrote:> Hi > > I have to design a FIR filter with very steep transition at cutoff and > high stop ban attenuation. FIR bcoz I need linear phase. I have matlab > available. Fdatool is useless since its FIR dont have a good transition. > > In literature search I came by papers talking about Sharp transition FIR`s > using Frequency response masking and multirate filters. I wanted to know if > someone has any experience with these filters ? I am going to try to > implement these and wanted to know what issues/problems I can face and are > these papers claims any good. > > If you also know of some technique for implementing sharp transition FIR`s > with low number of coeff`s let me know. Also if you know some material/book > that might help me with this point it to me. > > thanks in advance. Any information relavent or irrelavant is welcome.How sharp is sharp? What attenuation do you call high? The "better" the filter, the more coefficients it will have. There are some phenomena you can use to advantage, such as the alternating zeros in half-band filters, that can reduce the number in special circumstances. Without better specs, no specific suggestion is possible. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 18, 20062006-01-18
Ok.. This was my first posting in DSP guru so I am sorry for being a little sloppy. Here are the specs. The filtered signal is sampled at 19.0699MHz. It needs to be filtered by a half band filter. The filter must have cutoff at 9.53495 MHz. Its a digital filter and yes I do know that with FIR`s I should not expect much steep a transition. But I want to get as steep as I can get since the signal is actually a sampled Luminance singnal from a camera CCD. Hence any attenuation all attenuation below the nyquist rate will cause contrast problems. Well so here are the design specs I need 60Db attenuation at the nyquist rate i.e at 9.53495Mhz. Hence I will need to move my cutoff to below 9.534...Mhz but closer to it the better i.e narrower the transition widthe the better. Ofcourse I want ripple free pass band too. So having so ideal requirements can you suggest I can get ? As Jerry said " Engineering is the art of making what you want from things you can get." ......my question is what is the best that is available. thanks Gaurav>gaurav811 wrote: >> Hi >> >> I have to design a FIR filter with very steep transition at cutoff and >> high stop ban attenuation. FIR bcoz I need linear phase. I have matlab >> available. Fdatool is useless since its FIR dont have a goodtransition.>> >> In literature search I came by papers talking about Sharp transitionFIR`s>> using Frequency response masking and multirate filters. I wanted toknow if>> someone has any experience with these filters ? I am going to try to >> implement these and wanted to know what issues/problems I can face andare>> these papers claims any good. >> >> If you also know of some technique for implementing sharp transitionFIR`s>> with low number of coeff`s let me know. Also if you know somematerial/book>> that might help me with this point it to me. >> >> thanks in advance. Any information relavent or irrelavant is welcome. > >How sharp is sharp? What attenuation do you call high? The "better" the >filter, the more coefficients it will have. There are some phenomena you>can use to advantage, such as the alternating zeros in half-band >filters, that can reduce the number in special circumstances. Without >better specs, no specific suggestion is possible. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
Reply by ●January 18, 20062006-01-18
gaurav811 wrote:> Ok.. This was my first posting in DSP guru so I am sorry for being a little > sloppy. Here are the specs. The filtered signal is sampled at 19.0699MHz. > It needs to be filtered by a half band filter. The filter must have cutoff > at 9.53495 MHz. Its a digital filter and yes I do know that with FIR`s I > should not expect much steep a transition. But I want to get as steep as I > can get since the signal is actually a sampled Luminance singnal from a > camera CCD. Hence any attenuation all attenuation below the nyquist rate > will cause contrast problems. Well so here are the design specs > > I need 60Db attenuation at the nyquist rate i.e at 9.53495Mhz. Hence I > will need to move my cutoff to below 9.534...Mhz but closer to it the > better i.e narrower the transition widthe the better. > > Ofcourse I want ripple free pass band too. So having so ideal requirements > can you suggest I can get ? > > As Jerry said " Engineering is the art of making what you want from things > you can get." ......my question is what is the best that is available. > > thanks > Gaurav >> gaurav811 wrote: >>> Hi >>> >>> I have to design a FIR filter with very steep transition at cutoff and >>> high stop ban attenuation. FIR bcoz I need linear phase. I have matlab >>> available. Fdatool is useless since its FIR dont have a good > transition. >>> In literature search I came by papers talking about Sharp transition > FIR`s >>> using Frequency response masking and multirate filters. I wanted to > know if >>> someone has any experience with these filters ? I am going to try to >>> implement these and wanted to know what issues/problems I can face and > are >>> these papers claims any good. >>> >>> If you also know of some technique for implementing sharp transition > FIR`s >>> with low number of coeff`s let me know. Also if you know some > material/book >>> that might help me with this point it to me. >>> >>> thanks in advance. Any information relavent or irrelavant is welcome. >> How sharp is sharp? What attenuation do you call high? The "better" the >> filter, the more coefficients it will have. There are some phenomena you > >> can use to advantage, such as the alternating zeros in half-band >> filters, that can reduce the number in special circumstances. Without >> better specs, no specific suggestion is possible. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> ����������������������������������������������������������������������� >> > >MAXFLAT filters are ripple free. Halfband MAXFLATs have maximal flatness at ends of the frequency band (zero and fs/2, where fs is the sampling frequency). If you move these points of flatness from the ends of the frequency band to inside, transition band will get narrow but performance will slightly deteriorate at the ends. You can experiment with different points, but I think middle of pass and stop bands could be good choice. Ishtiaq.
Reply by ●January 18, 20062006-01-18
gaurav811 wrote:> Ok.. This was my first posting in DSP guru so I am sorry for being a little > sloppy. Here are the specs. The filtered signal is sampled at 19.0699MHz. > It needs to be filtered by a half band filter. The filter must have cutoff > at 9.53495 MHz. Its a digital filter and yes I do know that with FIR`s I > should not expect much steep a transition. But I want to get as steep as I > can get since the signal is actually a sampled Luminance singnal from a > camera CCD. Hence any attenuation all attenuation below the nyquist rate > will cause contrast problems. Well so here are the design specs > > I need 60Db attenuation at the nyquist rate i.e at 9.53495Mhz. Hence I > will need to move my cutoff to below 9.534...Mhz but closer to it the > better i.e narrower the transition widthe the better. > > Ofcourse I want ripple free pass band too. So having so ideal requirements > can you suggest I can get ?An FIR can be made as good as you like (or are willing to pay for). look at http://www.dsptutor.freeuk.com/remez/RemezFIRFilterDesign.html; call for a lowpass with a passband around .25 and stopband attenuation of 60 dB. and passband ripple of 1 dB. At .02 transition-band width, you need about 100 taps. At .01, twice that. Cutting ripple in half adds about 20%. Coefficients below: Have fun! Jerry -- Engineering is the art of making what you want from things you can get. ����������������������������������������������������������������������� Parks-McClellan FIR Filter Design Filter type: Low pass Passband: 0 - 0.25 Order: 223 Passband ripple: 0.5 dB Transition band: 0.01 Stopband attenuation: 60.0 dB Coefficients: a[0] = -0.0015519678500062043 a[1] = -0.0010584718435835293 a[2] = 0.00276542540120629 a[3] = 0.006854579452677297 a[4] = 0.0059805105149047825 a[5] = 9.968414602623038E-4 a[6] = -0.001638905322322646 a[7] = 3.426463569524034E-4 a[8] = 0.0019829491106141913 a[9] = 1.2216728063173718E-4 a[10] = -0.0015272857248788331 a[11] = 2.9370658914420322E-5 a[12] = 0.0014751145236264706 a[13] = -6.16045253842433E-5 a[14] = -0.0014156558783302523 a[15] = 1.4225000489712463E-4 a[16] = 0.0014175000769069998 a[17] = -2.172092395587219E-4 a[18] = -0.0014369366460440856 a[19] = 2.9821341477111234E-4 a[20] = 0.001471961128922486 a[21] = -3.856184785199397E-4 a[22] = -0.0015172572190824962 a[23] = 4.8013763184050564E-4 a[24] = 0.0015697963796736955 a[25] = -5.820924303214288E-4 a[26] = -0.001627547520838903 a[27] = 6.911063164255866E-4 a[28] = 0.0016886423621121876 a[29] = -8.072480438561357E-4 a[30] = -0.0017482107240542994 a[31] = 9.355387926675713E-4 a[32] = 0.0018089066956191468 a[33] = -0.0010731512675627181 a[34] = -0.0018683632417861086 a[35] = 0.0012208526780272068 a[36] = 0.0019236888722893688 a[37] = -0.0013825862175214799 a[38] = -0.0019781038654611625 a[39] = 0.0015545675478244572 a[40] = 0.0020264872874309185 a[41] = -0.001740074682073415 a[42] = -0.0020692035481341764 a[43] = 0.001939411344006515 a[44] = 0.0021058483562394876 a[45] = -0.0021517490861772833 a[46] = -0.0021334596425861803 a[47] = 0.0023803467783654227 a[48] = 0.002153774842341041 a[49] = -0.0026230376608953514 a[50] = -0.0021627854664972137 a[51] = 0.002882118790530423 a[52] = 0.0021605196099833634 a[53] = -0.0031574571769160367 a[54] = -0.002145245602355557 a[55] = 0.0034495002939836455 a[56] = 0.002114512455899031 a[57] = -0.003760793229655072 a[58] = -0.002068788622054502 a[59] = 0.004089467803249184 a[60] = 0.0020029935333274163 a[61] = -0.0044404333504053 a[62] = -0.0019190949041959717 a[63] = 0.004810857847383661 a[64] = 0.001811301012176468 a[65] = -0.0052047140691058435 a[66] = -0.0016787576315714335 a[67] = 0.005622880638218731 a[68] = 0.001518184340112389 a[69] = -0.00606777417632518 a[70] = -0.0013268887218543524 a[71] = 0.006541070148528754 a[72] = 0.0010992497127640928 a[73] = -0.0070491779183859725 a[74] = -8.358728285415194E-4 a[75] = 0.007588932946221968 a[76] = 5.223682780909983E-4 a[77] = -0.008175845470654659 a[78] = -1.6460766002894346E-4 a[79] = 0.008802434588193176 a[80] = -2.599905213605656E-4 a[81] = -0.009491708148874747 a[82] = 7.46696124680315E-4 a[83] = 0.010239815752915741 a[84] = -0.0013218879383125476 a[85] = -0.011073435508211965 a[86] = 0.001990185763260352 a[87] = 0.01200037779226543 a[88] = -0.0027816282342887316 a[89] = -0.013049367933101646 a[90] = 0.0037282819617062376 a[91] = 0.014261880464024466 a[92] = -0.004862903798750124 a[93] = -0.015675226310660744 a[94] = 0.006264046701001045 a[95] = 0.01738152206123828 a[96] = -0.008012746641033833 a[97] = -0.019489740176084937 a[98] = 0.010264314705578875 a[99] = 0.02219453212805551 a[100] = -0.01327771645769361 a[101] = -0.025844344526263777 a[102] = 0.017516411681132615 a[103] = 0.03109213674482167 a[104] = -0.02397587675683541 a[105] = -0.0394462746019019 a[106] = 0.03504159355279642 a[107] = 0.05504768958806252 a[108] = -0.058571645699810805 a[109] = -0.09525040048655707 a[110] = 0.14447721505492947 a[111] = 0.45555406523423275 a[112] = 0.45555406523423275 a[113] = 0.14447721505492947 a[114] = -0.09525040048655707 a[115] = -0.058571645699810805 a[116] = 0.05504768958806252 a[117] = 0.03504159355279642 a[118] = -0.0394462746019019 a[119] = -0.02397587675683541 a[120] = 0.03109213674482167 a[121] = 0.017516411681132615 a[122] = -0.025844344526263777 a[123] = -0.01327771645769361 a[124] = 0.02219453212805551 a[125] = 0.010264314705578875 a[126] = -0.019489740176084937 a[127] = -0.008012746641033833 a[128] = 0.01738152206123828 a[129] = 0.006264046701001045 a[130] = -0.015675226310660744 a[131] = -0.004862903798750124 a[132] = 0.014261880464024466 a[133] = 0.0037282819617062376 a[134] = -0.013049367933101646 a[135] = -0.0027816282342887316 a[136] = 0.01200037779226543 a[137] = 0.001990185763260352 a[138] = -0.011073435508211965 a[139] = -0.0013218879383125476 a[140] = 0.010239815752915741 a[141] = 7.46696124680315E-4 a[142] = -0.009491708148874747 a[143] = -2.599905213605656E-4 a[144] = 0.008802434588193176 a[145] = -1.6460766002894346E-4 a[146] = -0.008175845470654659 a[147] = 5.223682780909983E-4 a[148] = 0.007588932946221968 a[149] = -8.358728285415194E-4 a[150] = -0.0070491779183859725 a[151] = 0.0010992497127640928 a[152] = 0.006541070148528754 a[153] = -0.0013268887218543524 a[154] = -0.00606777417632518 a[155] = 0.001518184340112389 a[156] = 0.005622880638218731 a[157] = -0.0016787576315714335 a[158] = -0.0052047140691058435 a[159] = 0.001811301012176468 a[160] = 0.004810857847383661 a[161] = -0.0019190949041959717 a[162] = -0.0044404333504053 a[163] = 0.0020029935333274163 a[164] = 0.004089467803249184 a[165] = -0.002068788622054502 a[166] = -0.003760793229655072 a[167] = 0.002114512455899031 a[168] = 0.0034495002939836455 a[169] = -0.002145245602355557 a[170] = -0.0031574571769160367 a[171] = 0.0021605196099833634 a[172] = 0.002882118790530423 a[173] = -0.0021627854664972137 a[174] = -0.0026230376608953514 a[175] = 0.002153774842341041 a[176] = 0.0023803467783654227 a[177] = -0.0021334596425861803 a[178] = -0.0021517490861772833 a[179] = 0.0021058483562394876 a[180] = 0.001939411344006515 a[181] = -0.0020692035481341764 a[182] = -0.001740074682073415 a[183] = 0.0020264872874309185 a[184] = 0.0015545675478244572 a[185] = -0.0019781038654611625 a[186] = -0.0013825862175214799 a[187] = 0.0019236888722893688 a[188] = 0.0012208526780272068 a[189] = -0.0018683632417861086 a[190] = -0.0010731512675627181 a[191] = 0.0018089066956191468 a[192] = 9.355387926675713E-4 a[193] = -0.0017482107240542994 a[194] = -8.072480438561357E-4 a[195] = 0.0016886423621121876 a[196] = 6.911063164255866E-4 a[197] = -0.001627547520838903 a[198] = -5.820924303214288E-4 a[199] = 0.0015697963796736955 a[200] = 4.8013763184050564E-4 a[201] = -0.0015172572190824962 a[202] = -3.856184785199397E-4 a[203] = 0.001471961128922486 a[204] = 2.9821341477111234E-4 a[205] = -0.0014369366460440856 a[206] = -2.172092395587219E-4 a[207] = 0.0014175000769069998 a[208] = 1.4225000489712463E-4 a[209] = -0.0014156558783302523 a[210] = -6.16045253842433E-5 a[211] = 0.0014751145236264706 a[212] = 2.9370658914420322E-5 a[213] = -0.0015272857248788331 a[214] = 1.2216728063173718E-4 a[215] = 0.0019829491106141913 a[216] = 3.426463569524034E-4 a[217] = -0.001638905322322646 a[218] = 9.968414602623038E-4 a[219] = 0.0059805105149047825 a[220] = 0.006854579452677297 a[221] = 0.00276542540120629 a[222] = -0.0010584718435835293 a[223] = -0.0015519678500062043
Reply by ●January 19, 20062006-01-19
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <p>gaurav811 wrote: <blockquote TYPE=CITE>Ok.. This was my first posting in DSP guru so I am sorry for being a little <br>sloppy. Here are the specs. The filtered signal is sampled at 19.0699MHz. <br>It needs to be filtered by a half band filter. The filter must have cutoff <br>at 9.53495 MHz. Its a digital filter and yes I do know that with FIR`s I <br>should not expect much steep a transition. But I want to get as steep as I <br>can get since the signal is actually a sampled Luminance singnal from a <br>camera CCD. Hence any attenuation all attenuation below the nyquist rate <br>will cause contrast problems. Well so here are the design specs <br> </blockquote> Your specs don't make any sense. AFAICT you can't build such a filter. Or you can I guess, it would have one coefficient and that would be 1. <br> Why don't you explain what you you are trying to accomplish rather than asking how to make your chosen solution work without explaining what the problem is. If you are trying to build an anti-alias filter - you're too late you can't anti-alias filter after it's digital. <br> <p>-Jim <br> <br> <br> <blockquote TYPE=CITE> <br>I need 60Db attenuation at the nyquist rate i.e at 9.53495Mhz. Hence I <br>will need to move my cutoff to below 9.534...Mhz but closer to it the <br>better i.e narrower the transition widthe the better. <p>Ofcourse I want ripple free pass band too. So having so ideal requirements <br>can you suggest I can get ? <p>As Jerry said " Engineering is the art of making what you want from things <br>you can get." ......my question is what is the best that is available. <p>thanks <br>Gaurav <br>>gaurav811 wrote: <br>>> Hi <br>>> <br>>> I have to design a FIR filter with very steep transition at cutoff and <br>>> high stop ban attenuation. FIR bcoz I need linear phase. I have matlab <br>>> available. Fdatool is useless since its FIR dont have a good <br>transition. <br>>> <br>>> In literature search I came by papers talking about Sharp transition <br>FIR`s <br>>> using Frequency response masking and multirate filters. I wanted to <br>know if <br>>> someone has any experience with these filters ? I am going to try to <br>>> implement these and wanted to know what issues/problems I can face and <br>are <br>>> these papers claims any good. <br>>> <br>>> If you also know of some technique for implementing sharp transition <br>FIR`s <br>>> with low number of coeff`s let me know. Also if you know some <br>material/book <br>>> that might help me with this point it to me. <br>>> <br>>> thanks in advance. Any information relavent or irrelavant is welcome. <br>> <br>>How sharp is sharp? What attenuation do you call high? The "better" the <br>>filter, the more coefficients it will have. There are some phenomena you <p>>can use to advantage, such as the alternating zeros in half-band <br>>filters, that can reduce the number in special circumstances. Without <br>>better specs, no specific suggestion is possible. <br>> <br>>Jerry <br>>-- <br>>Engineering is the art of making what you want from things you can get. <br>>¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ <br>></blockquote> </html> ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Reply by ●January 19, 20062006-01-19
jim wrote: ...> ... If you are trying to build an anti-alias filter - > you're too late you can't anti-alias filter after it's digital.How dumb of me! I ought to have realized that that's what gaurav wanted to do. gaurav: Any frequencies above Nyquist will be aliased into the band below by the sampling process. That's why they are removed before sampling when that's possible. After sampling, there are no components that can be said to be above Fs/2; they've already been aliased below. Digital images are filtered before sampling by two processes, neither very good, but they're all we have. First, high-frequencies are attenuated by the averaging effect of finite-size pixel sensors. Second, they are attenuated by the ability of the imaging system; sharper (more highs) is not always better. I have seen diffusers used, and deliberate defocussing. I'm not in a position to say that either way to filter is a good idea. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 19, 20062006-01-19
Thank you all for your response. I will elaborate now further what I want to do. I hope this time its all complete. Now I have a Sony CCD that has CMYG color filters placed in following Mosaic pattern. Mg G Mg G .... Y Y Y Y.... Ye Cy Ye Cy... Y Y Y Y ... G Mg G Mg.... = Y Y Y Y ... Ye Cy Ye Cy... Y Y Y Y ... Mg G Mg G.... Y Y Y Y ... . . . . . . .and so on Now the first line of the image generated from the above mosaic pattern will be addition of the two horizontal row values i.e (Mg+Ye), (G+Cy), (Mg+Ye), (G+Cy) ... and so on and second line would be (G+Ye), (Mg+Cy), (G+Ye) ... and so on. This signal would be analog and would be first converted to digital form by an A2D. To generate the luminance signal I need to "ADD" the consecutive samples i.e Y = (Mg+Ye) + (G+Cy) = (G+Cy)+ (Mg+Cy)... The reason for putting ADD in quotation is because this addition would be like a low pass filtering by an FIR with two equal coeffs having appropriate scaling. Now this filter response actually has a very wide transition band and hence will bring a lot of high frequency component i.e has a very low stop band attenuation and high transition width. Thus after the addition process I want to filter this signal with a half band low pass filter to remove the unwanted high frequency component. I am currently not very sure about why we need a sharp FIR filter but I am told that since the Cyan Magenta Green and Yellow have their own seperate wavelengths and so the process of adding them leads to spurious intensity values at the high frequencies. Well so this is the purpose of the excercise. I am sure nobody would be absolutely clear with this explanation in regards to why I need such a filter but you should know now what I am trying to do here. For now I am going to try the standard FIR`s available in Matlab and if boss doesent like the Filter response will try to use the Frequency Masking Technique. But in that technique I really do not know how the bandedge filter gets implemented in real time. I am refering to " A new approach for design sharp filters using frequency response masking technique" by Lei Zhang and Yong Lian. I dont know if we replace the normal delays in the bandedge filters by M delays what happens to the data coming at the input rate. I mean if we put M delays at each tap then the total delay in the filter would be M*size of filter. So to implement this in real time either the filter should run at M times the clock rate or there can be some other solution which I dont know off. Thanks a lot for your help.I will update again as soon as I find more about this problem, Gaurav>jim wrote: > > ... >> ... If you are trying to build an anti-alias filter - >> you're too late you can't anti-alias filter after it's digital. > >How dumb of me! I ought to have realized that that's what gaurav wanted >to do. > >gaurav: > >Any frequencies above Nyquist will be aliased into the band below by the>sampling process. That's why they are removed before sampling when >that's possible. After sampling, there are no components that can be >said to be above Fs/2; they've already been aliased below. > >Digital images are filtered before sampling by two processes, neither >very good, but they're all we have. First, high-frequencies are >attenuated by the averaging effect of finite-size pixel sensors. Second,>they are attenuated by the ability of the imaging system; sharper (more >highs) is not always better. I have seen diffusers used, and deliberate >defocussing. I'm not in a position to say that either way to filter is a>good idea. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
Reply by ●January 19, 20062006-01-19
One mistake in the explanation. Actually I have to design a filter to replace the addition process. Basically instead of just adding consecutive values I have to design a half band filter and use that to filter the signal so that it has a better frequency response compared to the addition. Off Topic: This might be of interest to you. Its something I did for a project. http://www.ic.sunysb.edu/stu/gsharma/Filter%20Design%20Report.pdf>Thank you all for your response. I will elaborate now further what Iwant>to do. I hope this time its all complete. >Now I have a Sony CCD that has CMYG color filters placed in following >Mosaic pattern. > >Mg G Mg G .... Y Y Y Y.... >Ye Cy Ye Cy... Y Y Y Y ... >G Mg G Mg.... = Y Y Y Y ... >Ye Cy Ye Cy... Y Y Y Y ... >Mg G Mg G.... Y Y Y Y ... > . . . > . . . >.and so on > >Now the first line of the image generated from the above mosaic pattern >will be addition of the two horizontal row values i.e (Mg+Ye), (G+Cy), >(Mg+Ye), (G+Cy) ... and so on >and second line would be (G+Ye), (Mg+Cy), (G+Ye) ... and so on. > >This signal would be analog and would be first converted to digital form >by an A2D. To generate the luminance signal I need to "ADD" the >consecutive samples i.e Y = (Mg+Ye) + (G+Cy) = (G+Cy)+ (Mg+Cy)... > >The reason for putting ADD in quotation is because this addition wouldbe>like a low pass filtering by an FIR with two equal coeffs having >appropriate scaling. Now this filter response actually has a very wide >transition band and hence will bring a lot of high frequency componenti.e>has a very low stop band attenuation and high transition width. > >Thus after the addition process I want to filter this signal with a half >band low pass filter to remove the unwanted high frequency component. Iam>currently not very sure about why we need a sharp FIR filter but I amtold>that since the Cyan Magenta Green and Yellow have their own seperate >wavelengths and so the process of adding them leads to spuriousintensity>values at the high frequencies. Well so this is the purpose of the >excercise. I am sure nobody would be absolutely clear with this >explanation in regards to why I need such a filter but you should knownow>what I am trying to do here. > >For now I am going to try the standard FIR`s available in Matlab and if >boss doesent like the Filter response will try to use the Frequency >Masking Technique. But in that technique I really do not know how the >bandedge filter gets implemented in real time. I am refering to " A new >approach for design sharp filters using frequency response masking >technique" by Lei Zhang and Yong Lian. I dont know if we replace the >normal delays in the bandedge filters by M delays what happens to thedata>coming at the input rate. I mean if we put M delays at each tap then the >total delay in the filter would be M*size of filter. So to implementthis>in real time either the filter should run at M times the clock rate or >there can be some other solution which I dont know off. > >Thanks a lot for your help.I will update again as soon as I find more >about this problem, >Gaurav > > >>jim wrote: >> >> ... >>> ... If you are trying to build an anti-alias filter - >>> you're too late you can't anti-alias filter after it's digital. >> >>How dumb of me! I ought to have realized that that's what gaurav wanted>>to do. >> >>gaurav: >> >>Any frequencies above Nyquist will be aliased into the band below bythe> >>sampling process. That's why they are removed before sampling when >>that's possible. After sampling, there are no components that can be >>said to be above Fs/2; they've already been aliased below. >> >>Digital images are filtered before sampling by two processes, neither >>very good, but they're all we have. First, high-frequencies are >>attenuated by the averaging effect of finite-size pixel sensors.Second,> >>they are attenuated by the ability of the imaging system; sharper (more>>highs) is not always better. I have seen diffusers used, and deliberate>>defocussing. I'm not in a position to say that either way to filter isa> >>good idea. >> >>Jerry >>-- >>Engineering is the art of making what you want from things you can get. >>����������������������������������������������������������������������� >> > > >