求大神把以下代码转为ios类型代码

privatestringSurfFeatureDetect(){//获取参数boolgetDescriptors=cbSurfGetDescriptors.Checke... privatestring SurfFeatureDetect()
{
//获取参数
bool getDescriptors = cbSurfGetDescriptors.Checked;
MCvSURFParams surfParam =new MCvSURFParams();
surfParam.extended=rbSurfBasicDescriptor.Checked ?0 : 1;
surfParam.hessianThreshold=double.Parse(txtSurfHessianThreshold.Text);
surfParam.nOctaves=int.Parse(txtSurfNumberOfOctaves.Text);
surfParam.nOctaveLayers=int.Parse(txtSurfNumberOfOctaveLayers.Text);
//计算
SURFFeature[] features =null;
MKeyPoint[] keyPoints =null;
Stopwatch sw =new Stopwatch();
sw.Start();
if (getDescriptors)
features = imageSourceGrayscale.ExtractSURF(ref surfParam);
else
keyPoints = surfParam.DetectKeyPoints(imageSourceGrayscale, null);
sw.Stop();
//显示
bool showDetail = cbSurfShowDetail.Checked;
Image<Bgr, Byte> imageResult = imageSourceGrayscale.Convert<Bgr, Byte>();
StringBuilder sbResult =new StringBuilder();
int idx =0;
if (getDescriptors)
{
foreach (SURFFeature feature in features)
{
imageResult.Draw(new CircleF(feature.Point.pt, 5), new Bgr(255d, 0d, 0d), 2);
if (showDetail)
{
sbResult.AppendFormat("第{0}点(坐标:{1},尺寸:{2},方向:{3}°,hessian值:{4},拉普拉斯标志:{5},描述:[",
idx, feature.Point.pt, feature.Point.size, feature.Point.dir, feature.Point.hessian, feature.Point.laplacian);
foreach (float d in feature.Descriptor)
sbResult.AppendFormat("{0},", d);
sbResult.Append("]),");
}
idx++;
}
}
else
{
foreach (MKeyPoint keypoint in keyPoints)
{
imageResult.Draw(new CircleF(keypoint.Point, 5), new Bgr(255d, 0d, 0d), 2);
if (showDetail)
sbResult.AppendFormat("第{0}点(坐标:{1},尺寸:{2},方向:{3}°,响应:{4},octave:{5}),",
idx, keypoint.Point, keypoint.Size, keypoint.Angle, keypoint.Response, keypoint.Octave);
idx++;
}
}
pbResult.Image = imageResult.Bitmap;
//释放资源
imageResult.Dispose();
//返回
returnstring.Format("·SURF角点,用时{0:F05}毫秒,参数(描述:{1},hessian阀值:{2},octave数目:{3},每个octave的层数:{4},检测到{5}个角点\r\n{6}",
sw.Elapsed.TotalMilliseconds, getDescriptors ? (surfParam.extended ==0?"获取基本描述" : "获取扩展描述") : "不获取描述", surfParam.hessianThreshold,
surfParam.nOctaves, surfParam.nOctaveLayers, getDescriptors ? features.Length : keyPoints.Length, showDetail ? sbResult.ToString() +"\r\n" : "");
}
展开
 我来答
萬劍壹
2013-01-23 · TA获得超过3022个赞
知道小有建树答主
回答量:1980
采纳率:50%
帮助的人:565万
展开全部
我的电脑--工具--文件夹选项--查看--把隐藏已知文件类型的扩棚局裂展名前面的√去掉

复制到记事本链闭

另存到桌面

文件名 111.ios
文件类型腊段 所有文件
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式