当前位置:网站首页>Exam23 named windows and simplified paths, grayscale conversion
Exam23 named windows and simplified paths, grayscale conversion
2022-06-13 02:29:00 【An unforgettable squirrel】
Function as follows :
src = new Mat(@"..\..\Images\ocv02.jpg", ImreadModes.Grayscale)
// Add @ No need to use double / Said path , That is, the following string does not change meaning
var window = new Window("window", image: src)
// Be careful window This function is not in cv Under the namespace , Belong to OpenCvSharp Next function , The second parameter can be written directly src
Color image to grayscale image
Cv2.CvtColor(srcCopy, srcCopy, ColorConversionCodes.BGRA2GRAY);
Debugging found , Original resolution 700*377*3=DataEnd-Data ,CV_8U3 Consistent with the theory
After the transformation 700*377=DataEnd-Data, The debug environment is displayed as CV_8U1
routine 2 The complete code is as follows
static void Main(string[] args)
{
readImage1();
readImage2();
}
private static void readImage2()
{
// Add @ No need to use double / Said path , That is, the following string does not change meaning
using (var src = new Mat(@"..\..\Images\ocv02.jpg", ImreadModes.Unchanged))
{
// Be careful window This function is not in cv Under the namespace ,OpenCvSharp Next function
using (var window = new Window("window", image: src))
{
// Error closing window manually
Cv2.WaitKey();
}
}
}
private static void readImage1()
{
using (var src = new Mat(@"..\..\Images\ocv02.jpg", ImreadModes.Grayscale))
{
using (var window = new Window("window", image: src))
{
Cv2.WaitKey();
}
}
}边栏推荐
- Laravel 权限导出
- Understand CRF
- [Dest0g3 520迎新赛] 拿到WP还整了很久的Dest0g3_heap
- Linear, integer, nonlinear, dynamic programming
- Configuring virtual private network FRR for Huawei equipment
- JS get element
- An image is word 16x16 words: transformers for image recognition at scale
- Basic exercises of test questions Fibonacci series
- Think about the possibility of attacking secure memory through mmu/tlb/cache
- Swiper horizontal rotation grid
猜你喜欢

柏瑞凱電子沖刺科創板:擬募資3.6億 汪斌華夫婦為大股東

Solution of depth learning for 3D anisotropic images
![[pytorch]fixmatch code explanation (super detailed)](/img/22/66703bea0f8ee40eceb0687fcb3ad2.jpg)
[pytorch]fixmatch code explanation (super detailed)
![[reading papers] deep learning face representation by joint identification verification, deep learning applied to optimization problems, deepid2](/img/a1/151d2afe6d7f0bd95fe93fc80f633e.jpg)
[reading papers] deep learning face representation by joint identification verification, deep learning applied to optimization problems, deepid2

Superficial understanding of conditional random fields

Build MySQL environment under mac

Paper reading - beat tracking by dynamic programming
![[learning notes] xr872 GUI littlevgl 8.0 migration (display part)](/img/5e/fc8c3fe3029c36648fbc3f48bc0c2f.jpg)
[learning notes] xr872 GUI littlevgl 8.0 migration (display part)

Jump model between mirrors

01 初识微信小程序
随机推荐
Leetcode 473. 火柴拼正方形 [暴力+剪枝]
[reading papers] deepface: closing the gap to human level performance in face verification. Deep learning starts with the face
Priority queue with dynamically changing priority
Sensor: MQ-5 gas module measures the gas value (code attached at the bottom)
1、 Set up Django automation platform (realize one click SQL execution)
Stm32f4 DMA Da sine wave generator keil5 Hal library cubemx
[Dest0g3 520迎新赛] 拿到WP还整了很久的Dest0g3_heap
[reading point paper] deeplobv3+ encoder decoder with Atlas separable revolution
[work with notes] MFC solves the problem that pressing ESC and enter will automatically exit
Leetcode 473. Match to square [violence + pruning]
ROS learning-6 detailed explanation of publisher programming syntax
[pytorch]fixmatch code explanation - data loading
[keras learning]fit_ Generator analysis and complete examples
Test questions basic exercise 01 string
Bluetooth module: use problem collection
Cumulative tax law: calculate how much tax you have paid in a year
L1 regularization and its sparsity
Basic principle of bilateral filtering
C language compressed string is saved to binary file, and the compressed string is read from binary file and decompressed.
[pytorch] kaggle image classification competition arcface + bounding box code learning