ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Noise Removal 24-bit

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
w2m Posted - Feb 18 2015 : 08:04:37
Has anyone been able to find noise removal code for 24-bit images? I have searched for years for this but have not been able to come up with a noise removal procedure for Delphi. If not what are the best ImageEnProc procedures to use?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
11   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 25 2015 : 18:22:48
FYI, next version of IEVision will support non-local means denoising.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Feb 27 2015 : 13:13:37
Hi

Yes, thanks, Bill,

Have not yet had time to investigate an algorithm yet though.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Feb 27 2015 : 08:01:04
Nigel,

Did you receive my email with sample images?


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
spetric Posted - Feb 19 2015 : 01:46:39
Hi Bill,

A popular approach to image denoising is "non-local means noise reduction" or "non-local means denoising". However, I did not find any Delphi source around, only C.

Here is a good demo page:
http://demo.ipol.im/demo/bcm_non_local_means_denoising/

There is also article and source code available (C/C++).
w2m Posted - Feb 18 2015 : 20:29:53
Nigel,

Sure... but I need to be able to de-noise most any jpg with noticeable noise for a commercial application.

Spetric, Thanks for the limk.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Feb 18 2015 : 18:59:28
Hi Bill

Can you email me some sample images you are looking to denoise?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
spetric Posted - Feb 18 2015 : 13:44:00
Hi,

besides median filter, you can use Kuwahara filter, as it preserves image edges much better then median filter.
I have implemented Kuwahara filter as a lua script in demo project posted in "User Demos and Applications" topic, but it seems there is Matlab and Delphi code available on this page:

http://old.rifqion.com/2009/05/09/kuwahara-filter-matlab-image-processing/

w2m Posted - Feb 18 2015 : 10:53:43
Thanks Uwe... I guess I'll have to brush up on my C...

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Uwe Posted - Feb 18 2015 : 10:32:44
Bill, the cached version of that page is freely available. Here's the relevant code (not formatted):




{***********************************
 *  copy the image data to a Array of integer
 *
 ***********************************}
 
procedure ScanRasterValues (aBmp : TBitmap; xstart, ystart, xsteps, ysteps : Integer; var RvalueArray, GValueArray, BValueArray : TImageFilter);
var   ByteLine  : Pbytearray;
      i, j      : integer;
begin
 
 
 
   for j := ystart to ystart + ysteps  do
         begin
 
         ByteLine := aBmp.ScanLine[j];
 
         for  i:= xstart to xstart + xsteps  do
 
                begin
 
                   BvalueArray [i-xstart, j-ystart] := ByteLine[3*i];
                   GvalueArray [i-xstart, j-ystart] := ByteLine[3*i +1];
                   RvalueArray [i-xstart, j-ystart] := ByteLine[3*i +2];
 
 
                end;
 
         end;
 
end;
 
 
 
function FilterResult (aFilter, bFilter : TImageFilter) : word;
var  i,j   :  Integer;
     n,m     :  Integer;
 
begin
     n := length( aFilter );
     m:= n;
 
 
     for i := 1 to n do
       for j := 1 to m do
          result := aFilter[i][j] * bfilter[i,j];
end;
 
{******************************************************************************
 *      Input:
 *          bmp1, bm2 : TBitMap
 *          ImageFilter  : Image Filter array , size   FilterSize x  FilterSize
 *          assume filter size is always even !!  1,3,5, ...
 *
 *    OutPut:
 *
 *
 *
 *******************************************************************************}
 
procedure ReduceNoise_AnyFilter (bmp1, bmp2 : TBitMap; aImageFilter : TImageFilter );
 
var  P1                 :    pbytearray;  //  from Image 1
     FilterSize         :    Integer;     //  3,5,7
     FilterSize2        :    Integer;     //  2,3,4
     i,j,jj             :    Integer;
     RvalueArray        :    TImageFilter;    // Red Color Values
     GvalueArray        :    TImageFilter;    // Green Color Values
     BvalueArray        :    TImageFilter;    // Blue Color Values
 
begin
     //  the filter size
     FilterSize := length(aImageFilter);
 
     FilterSize2 := round((FilterSize-1)/2 +1);
 
      //  adjust dyn. arrays
 
     setlength ( RvalueArray, Filtersize, Filtersize );
 
     setlength ( GvalueArray, Filtersize, Filtersize );
 
     setlength ( BvalueArray, Filtersize, Filtersize );
 
 
     //  Loop through all Pixels
     for j := FilterSize2 to bmp1.Height - (FilterSize2 +1) do
         begin
 
             p1 := bmp1.ScanLine[j];
 
 
             for i := FilterSize2 to bmp1.Width - (FilterSize2+1)  do
 
               begin
 
                ScanRasterValues (bmp2, i-FilterSize2, j-FilterSize2, FilterSize, FilterSize,RvalueArray, GValueArray, BValueArray );
 
 
 
                p1[3 * i ]     :=  FilterResult ( aImageFilter,BvalueArray ) ;     //  Bvalue
                p1[3 * i + 1 ] :=  FilterResult ( aImageFilter,GvalueArray ) ;     //  Gvalue
                p1[3 * i + 2 ] :=  FilterResult ( aImageFilter,RvalueArray ) ;     //  Rvalue
 
 
               end; // i := ...
 
 
 
 
         end;  //  j:= ..
end;






http://en.wikipedia.org/wiki/Median_filter (also see links at page bottom)

http://www.student.kuleuven.be/~m0216922/CG/filtering.html
http://www.miszalok.de/Samples/IP/median_filter/median_filter.pdf

http://www.librow.com/articles/article-1/appendix-a-1 (look for the implementation file link)

http://ndevilla.free.fr/median/median.pdf



-Uwe
w2m Posted - Feb 18 2015 : 10:17:46
Thanks Uwe, but I am not a member of experts-exchange.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Uwe Posted - Feb 18 2015 : 10:15:41
Bill,

This might be a starter (scroll to the bottom of the page):

http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_24377488.html

-Uwe