作业帮 > 英语 > 作业

英语翻译Indeed if you imagine an image with only alternative hor

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:英语作业 时间:2024/08/03 10:03:42
英语翻译
Indeed if you imagine an image with only alternative horizontal stripes of red and blue,the algorithmswouldn’t see the edges of those stripes if it only compared a pixel to its right neighbour.Thus the two comparisons for each pixel are necessary.So here is the algorithm in symbolic language and in C.
This algorithm was tested on several source images of different types and it gives fairly good results.It is mainly limited in speed because of frequent memory access.The two square roots can be removed easily by squaring the comparison; however,the colour extractions cannot be improved very easily.If we consider that the longest operations are the getpixel function,get*32 and putpixel functions,we obtain a polynomial complexity of 4*N*M,where N is the number of rows and M the number of columns.This is not reasonably fast enough to be computed in real time.For a 300x300x32 image I get about 26 transforms per second on an Athlon XP 1600+.Quite slow indeed.Here are the results of the algorithm on an example image:
A few words about the results of this algorithm:Notice that the quality of the results depends on the sharpness of the source image.If the source image is very sharp edged,the result will reach perfection.However if you have a very blurry source you might want to make it pass through a sharpness filter first,which we will study later.Another remark,you can also compare each pixel with its second or third nearest neighbours on the right and on the bottom instead of the nearest neighbours.The edges will be thicker but also more exact depending on the source image’s sharpness.Finally we will see later on that there is another way to make edge detection with matrix convolution.
b – Color extraction
The other immediate application of pixel comparison is color extraction.Instead of comparing each pixel with its neighbors,we are going to compare it with a given color C1.This algorithm will try to detect all the objects in the image that are colored with C1.This was quite useful for robotics for example.It enables you to search on streaming images for a particular color.You can then make you robot go get a red ball for example.We will call the reference color,the one we are looking for in the image C0 = (R0,G0,B0).
Once again,even if the square root can be easily removed it doesn’t really affect the speed of the algorithm.What really slows down the whole loop is the NxM getpixel accesses to memory and the get*32 and putpixel.This determines the complexity of this algorithm:2xNxM,where N and M are respectively the numbers of rows and columns in the bitmap.The effective speed measured on my computer is about 40 transforms per second on a 300x300x32 source bitmap.Here are the results I obtained using this algorithm searching for whites shape in the source bitmap:
英语翻译Indeed if you imagine an image with only alternative hor
事实上,如果你想象的形象与唯一的选择横向条纹的红色和蓝色,algorithmswouldn't见的边缘,这些条纹,如果只有一个像素相比,其权利的邻居.因此,这两个比较每个像素是必要的.因此,这里是算法在象征性的语言和C语言
这个算法是测试的几个图片来源不同类型和它给了较好的效果.这主要是在有限的速度,因为频繁的记忆体存取.这两个广场的根源可以删除很容易由现蕾的比较;不过,颜色提取物不能得到改善,很容易.如果我们考虑到时间最长的行动是getpixel功能,得到* 32和putpixel职能,我们得到一个多项式的复杂性4 *不适用*米,其中n是行数和米栏数.这不是合理的不够快,计算在实时性.为300x300x32的形象,我收到约26变换每秒对一的Athlon XP 1600 + .相当缓慢,确实.这里的结果,该算法对一个例子形象:
几句话的结果,这个算法:看到结果的质量取决于对尖锐的源图像.如果源图像是非常尖锐的微升,结果将达到尽善尽美.不过,如果您有一个非常模糊的来源,您可能希望把它通过一敏锐性过滤器第一,我们会研究稍后.另一种说法,您还可以比较每个像素与它的第二次或第三次最接近的邻国的权利和在底部,而不是最近的邻居.边缘将较厚,但也更准确,视乎有关来源的形象的敏锐性.最后我们将看到,稍后有另一种方式,使边缘检测与矩阵的卷积.
B组-颜色提取
其他的即时应用像素比较是彩色的提取.而不是比较,每个像素与它的邻邦,我们去比较它与某一特定颜色的C1 .该算法将尝试侦测到所有的物体的形象是与有色的C1 .这是相当有用的机器人,例如.它可以让您搜寻就流图像为特定的颜色.然后,您就可以让你的机器人去得到红球为例.我们将调用参考颜色,一个我们正在寻找在形象的C0 = ( R0的,g0 ,本B0 ) .
再次,即使的平方根可以很容易地删除它并没有真正影响速度的算法.什么真的拖慢整个回路是nxm getpixel通道记忆体以及获得* 32和putpixel .这就决定了复杂的算法:2xnxm ,其中N和M分别是多少行和列在点阵图.有效的速度来衡量我的电脑上是约40变换每秒就一300x300x32来源点阵图.这里是结果我获得了使用此算法的搜索白人的形状,在源位图:
参考