当前位置:网站首页>CV image flipping, emgucv image rotation "recommended collection"
CV image flipping, emgucv image rotation "recommended collection"
2022-07-25 20:59:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
i use this codeprivate void button12_Click(object sender, EventArgs e)
{
Bitmap bm = new Bitmap(pictureBox1.Image);
Image img = new Image(bm);
double x = 20;
img.Rotate(x, new Gray(255));
pictureBox9.Image = img.ToBitmap();
}
for image rotation
but it doesn’t work ,
why????
Solution follow this link: http://www.emgu.com/wiki/files/1.4.0.0/html/ae9c1603-5135-1a2f-bd46-1dd736d4d7a8.htm[^]
You will see the Rotate method also has an argument called crop, set this argument false and all information of your image will be preserved.
I think your code should be changed into:
img = img.Rotate(x, new Gray(255),false);
Hope this will help you!
You may have to try this:
Image imgOut= img.Rotate(x, new Gray(255));
pictureBox9.Image= imgOut.ToBitmap();
I did not compile, even though i have emgucv on my machine, but I looked into their libray. I believe you should call like I said above.
see their implementation:
public Image WarpAffine(Matrix mapMatrix, int width, int height, INTER interpolationType, WARP warpType, TColor backgroundColor) where TMapDepth: new()
{
Image image = new Image(width, height);
//this call externs c function
CvInvoke.cvWarpAffine(base.Ptr, image.Ptr, mapMatrix.Ptr, (int) (interpolationType | ((INTER) ((int) warpType))), backgroundColor.MCvScalar);
return image;
}
Well, in case of “it doesn’t work”.
The problem is not that complected.
change this line
img.Rotate(x, new Gray(255));
to
img = img.Rotate(x, new Gray(255));
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/127844.html Link to the original text :https://javaforall.cn
边栏推荐
- Detailed explanation of document operation
- Pycharm跑程序时自动进入测试模式
- Online random coin tossing positive and negative statistical tool
- yuv422转rgb(422sp转420p)
- Leetcode-146: LRU cache
- 测试用例和缺陷报告模板
- 一道golang中关于recover的面试题
- Brush questions with binary tree (4)
- cts测试步骤(卡西欧cts200测试)
- Leetcode skimming -- guess the size of numbers II 375 medium
猜你喜欢
![[fiddlertx plug-in] use Fiddler to capture the package Tencent classroom video download (unable to capture the package solution)](/img/de/7a288ee8e6001235d4869c10503932.png)
[fiddlertx plug-in] use Fiddler to capture the package Tencent classroom video download (unable to capture the package solution)

Force deduction ----- calculate the money of the force deduction bank

Success factors of software R & D effectiveness measurement
![[online tutorial] iptables official tutorial -- learning notes 2](/img/7d/5f8328d1b4c8878f17c95d2658d2d6.jpg)
[online tutorial] iptables official tutorial -- learning notes 2

DDD的Go实战

【FiddlerTX插件】使用Fiddler抓包腾讯课堂视频下载(抓不到包解决方案)
![Vulnhub | dc: 6 | [actual combat]](/img/7e/de7d5b56724bde5db2bb8338c35aa8.png)
Vulnhub | dc: 6 | [actual combat]
![[FAQ] access the HMS core push service, and the server sends messages. Cause analysis and solutions of common error codes](/img/65/4dd3a521946e753c79d3db1fa0a4f4.png)
[FAQ] access the HMS core push service, and the server sends messages. Cause analysis and solutions of common error codes
![[leetcode] 28. Implement strstr ()](/img/87/0af2da458e53d31012d6535cc132bb.png)
[leetcode] 28. Implement strstr ()

As a test, how to understand thread synchronization and asynchrony
随机推荐
The database empties the table data and makes the primary key start from 1
Step num problem
Explain in detail the principle of MySQL master-slave replication "suggestions collection"
[FAQ] access the HMS core push service, and the server sends messages. Cause analysis and solutions of common error codes
Illustration leetcode - 3. longest substring without repeated characters (difficulty: medium)
LeetCode通关:哈希表六连,这个还真有点简单
Solution to oom exceptions caused by improper use of multithreading in production environment (supreme Collection Edition)
476-82(322、64、2、46、62、114)
Niuke-top101-bm37
leetcode-114:二叉树展开为链表
Character function and string function (2)
How to obtain the subordinate / annotation information of KEGG channel
Leetcode-114: expand binary tree into linked list
Unity VS—— VS中默认调试为启动而不是附加到Unity调试
An interview question about concurrent reading and writing of map in golang
I live far away. Is there a good way to open an account? Is it safe to open a stock account by mobile phone?
Rand1 generates rand9
cv图像翻转,EmguCV图像旋转「建议收藏」
Leetcode skimming -- guess the size of numbers II 375 medium
Leetcode-6126: designing a food scoring system