• 大小: 1.34MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-27
  • 语言: 其他
  • 标签: 图像  修复  

资源简介

这是图像修复的算法实现,具体的实现方法见文件详情。

资源截图

代码片段和文件信息



////////////////////////////////////////////////////////////////////////////
// Abstract Real Image Filter
// ==========================
//
// Group: Eggs and Pictures.
// Author: Bernard De Cuyper
// Date: 10/06/2002
//
// Purpose: Define the concept of image operations on real data.
// It has design feature near the Java style (BufferedImageOp
// but it is designed to do floating point computations.
// We provide integer based equivalents too.
//
// Copyrights: Bernard De Cuyper & Eddy Fraiha 2002
// Eggs & Pictures. 
// MIT/Open BSD copyright model.
//
/////////////////////////////////////////////////////////////////////////////


#include “stdafx.h“ 
#include “AbsFImageFilter.hpp“



FImage* AbsFImageFilter::mfilter(int n FImage* src FImage* dest)
{
if( dest == 0 ) dest= src->copy();

FImage* workArea= src->copy();

for(int i=0; i< n; i++)
{
dest= filter(workArea dest);

workArea->set( *dest );
}

delete workArea;

return dest;
}

FImage* AbsFImageFilter::mSelectedFilter(int n AnImage* mask FImage* src FImage* dest)
{
if( dest == 0 ) dest= src->copy();

FImage* workArea= src->copy();

for(int i=0; i< n; i++)
{
dest= selectedFilter(mask workArea dest);

workArea->set( *dest );
}

delete workArea;

return dest;
}


void AbsFImageFilter::loadMask(AnImage& mask)
{
int w1= mask.getWidth()-1;
int h1= mask.getHeight()-1;

int xy;

/* plus 1

for(x=1; x  for(y=1; y if( mask.getGrey(xy) == maskValue || 
mask.getGrey(x+1y) == maskValue || mask.getGrey(x-1y) == maskValue || 
mask.getGrey(xy+1) == maskValue || mask.getGrey(xy-1) == maskValue)
nMask++;

xm= new int[nMask];
ym= new int[nMask];
nMask=0;

for(x=1; x  for(y=1; y if( mask.getGrey(xy) == maskValue || 
mask.getGrey(x+1y) == maskValue || mask.getGrey(x-1y) == maskValue || 
mask.getGrey(xy+1) == maskValue || mask.getGrey(xy-1) == maskValue)
{
xm[nMask]= x;
ym[nMask]= y;

nMask++;
}
*/

for(x=1; x  for(y=1; y if( mask.getGrey(xy) == maskValue )
nMask++;

xm= new int[nMask];
ym= new int[nMask];
nMask=0;

for(x=1; x  for(y=1; y if( mask.getGrey(xy) == maskValue )
{
xm[nMask]= x;
ym[nMask]= y;

nMask++;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2430  2002-12-05 16:29  image_inpainting\image_inpainting\AbsFImageFilter.cpp

     文件       2395  2002-12-05 16:29  image_inpainting\image_inpainting\AbsFImageFilter.hpp

     文件       2595  2002-12-05 17:46  image_inpainting\image_inpainting\AbsFTriDiagonalLS.hpp

     文件       2571  2002-08-03 11:57  image_inpainting\image_inpainting\AbsParameter.hpp

     文件       2430  2002-08-03 11:57  image_inpainting\image_inpainting\AbsRImageFilter.cpp

     文件       2395  2002-11-10 18:21  image_inpainting\image_inpainting\AbsRImageFilter.hpp

     文件        913  2002-08-03 11:57  image_inpainting\image_inpainting\AbsRImageFlow.hpp

     文件       1744  2002-09-01 20:24  image_inpainting\image_inpainting\AbsTriDiagIterativeLS.hpp

     文件       2565  2002-09-01 18:55  image_inpainting\image_inpainting\AbsTriDiagonalLS.hpp

     文件        684  2002-10-24 18:46  image_inpainting\image_inpainting\AFuzzyOp.hpp

     文件       1017  2002-09-05 12:55  image_inpainting\image_inpainting\ALongTimeWorker.hpp

     文件       6134  2007-06-25 14:47  image_inpainting\image_inpainting\AMultiClassobjectEvaluator.cpp

     文件       2099  2002-09-27 21:09  image_inpainting\image_inpainting\AMultiClassobjectEvaluator.hpp

     文件       7484  2002-12-05 18:30  image_inpainting\image_inpainting\AnImage.cpp

     文件       5446  2002-12-05 18:29  image_inpainting\image_inpainting\AnImage.hpp

     文件       1181  2002-08-03 11:57  image_inpainting\image_inpainting\AnImageOp.cpp

     文件       3292  2002-08-03 11:57  image_inpainting\image_inpainting\AnImageOp.hpp

     文件      30683  2002-11-17 17:01  image_inpainting\image_inpainting\AnImageReader.cpp

     文件       1974  2002-10-20 14:35  image_inpainting\image_inpainting\AnImageReader.hpp

     文件       1053  2002-07-10 19:40  image_inpainting\image_inpainting\AnImageSequenceOp.hpp

     文件      36924  2002-11-19 23:10  image_inpainting\image_inpainting\AnImageWriter.cpp

     文件       1788  2002-11-19 17:29  image_inpainting\image_inpainting\AnImageWriter.hpp

     文件       1030  2002-08-03 11:57  image_inpainting\image_inpainting\AnInpaintingOp.hpp

     文件        967  2002-08-03 11:57  image_inpainting\image_inpainting\AnisotropicFlow.cpp

     文件        777  2002-08-03 11:57  image_inpainting\image_inpainting\AnisotropicFlow.hpp

     文件        867  2002-08-03 11:57  image_inpainting\image_inpainting\AR3ChannelConverter.hpp

     文件       1723  2002-08-03 11:57  image_inpainting\image_inpainting\ARColorImageFilter.cpp

     文件       1482  2002-10-23 15:35  image_inpainting\image_inpainting\ARColorImageFilter.hpp

     文件       1555  2002-09-29 12:53  image_inpainting\image_inpainting\ASeparateFeatureClassifier.cpp

     文件       1577  2002-09-29 12:36  image_inpainting\image_inpainting\ASeparateFeatureClassifier.hpp

............此处省略608个文件信息

评论

共有 条评论