图像处理-笔刷 [英] Image Processing - Brushes

查看:83
本文介绍了图像处理-笔刷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好1,

我最近研究图像处理.我需要一些信息来改善自己.
到目前为止,我已经完成了应用整个图片的过程.
但是现在我要在单击的位置处理图像.因此,我有点需要创建画笔并使用它们.我不知道该怎么做.

1.)我想知道是否有人可以引导我一些网站或参考文献,以便我阅读和学习如何实现在c#中创建画笔并将其用于图像上.

除此之外,我一直在寻找找到我单击的像素的实际坐标.我找到了一段获取图片框坐标的代码.但这不是大多数时间的实际图像(例如,当图片被拉伸或缩放等时)
2.)如何通过单击获得实际的图像坐标?

已经非常感谢...

Hello Every1,

I do study on image processesing lately. I need some information to improve myself.
So far, I have made processes which applies entire picture.
But now I want to process the image where I click. So I kind of need to create brushes, use them. I have no idea how to do this.

1.) I wonder if anyone can lead me some websites or references that I can read and learn how to achieve creating brushes and using them on image in c#.

Apart from this, I ve been looking for finding the actual coordinates of the pixel I click on. I found a piece of code that I get the coordinates of picturebox. But it''s not the actual image most of the time ( for example, when the picture is streched or zoomed or something)
2.) How can I get the actual image coordinates by clicking on it?

Thanks already...

推荐答案

您要创建哪种画笔?我很久以前写了一篇GDI +文章(尽管可能是用c ++编写的),涵盖了不同类型的画笔.


What sort of brushes do you want to create ? I wrote a GDI+ article ages ago ( although it may be in c++ ) covering the different types of brushes.


写道:​​

2.)如何通过单击获得实际的图像坐标?

2.) How can I get the actual image coordinates by clicking on it?



最好的选择是在绘画事件中绘制自己的图像,以便您对发生的任何大小调整负责,因此可以反转该算法以将屏幕上图像中的点转换为实际图像中的该点. />
图片框与图像处理并不真正兼容.



Your best bet is to draw your own image in your paint event, so that you are responsible for any resizing that occurs, and can therefore reverse that algorithm to convert a point in the image on screen to that point in the actual image.

Pictureboxes are not really compatible with image processing.


我想创建一些圆形画笔.我已经写了一些过滤器.我想应用此滤镜而不是整个图片,而是单击并在画笔内单击的点...
所以我现在有点卡住了:)

关于画自己的形象...是什么意思?除了图片框,我还能在哪里绘制图像?我在编程方面还是很新的.如果您也提供了更多帮助,将不胜感激:)
I want to create some circual brushes. I ve got some filters I ve written. I want to apply this filters not entire picture, but the point I click and and inside this brushes...
So I''m kind of stuck now :)

About drawing my own image... what do you mean? Where else can I draw my image apart from picturebox? I''m still pretty new in programming. Would appreciate a lot if you helped a bit more, too :)


做到这一点的最佳方法,IMO是将画笔创建为位图,并在圆周围绘制一个部分用刷子内部未使用的颜色.然后,您可以使用ImageAttributes类指定要透明绘制的颜色范围,以便仅绘制圆形.
The best way to do that, IMO, is to create the brush as a bitmap, with a section around the circle drawn in a color not used inside the brush. Then you can use an ImageAttributes class to specify a range of colors to draw transparently, in order to draw only the circle.


这篇关于图像处理-笔刷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆