❄ImGui, Gaussian Blur, OpenCV, DirectX11
21
stars
3
commits
C++
primary language
Aug 12, 2024
updated

This is an application that combines ImGui for GUI rendering, OpenCV for image processing, and DirectX11 for graphics rendering. This project demonstrates how to use these libraries together to create a simple application that loads, processes, and displays images.
sudo apt-get install libopencv-dev
mkdir c:\src
cd c:\src
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
.\vcpkg.exe integrate install
.\vcpkg.exe integrate powershell
.\vcpkg.exe install opencv[contrib,core,dnn,freetype,jpeg,openmp,png,quirc,tiff,webp,world]:x64-windows
//with GaussianBlur image (example from https://github.com/JimmyHHua/opencv_tutorials/blob/master/python/code_022/opencv_022.py)
cv::Mat src = cv::imread("C:/image.jpg");
cv::Mat dst = ImageProcessor::ApplyGaussianBlur(src, 15);
ID3D11Texture2D* texture_blur = RenderUtils::LoadTextureFromMat(dst, Render::Data::Device, Render::Data::DeviceContext);
ID3D11ShaderResourceView* texture_srv = nullptr;
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
srvDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
srvDesc.Texture2D.MipLevels = 1;
srvDesc.Texture2D.MostDetailedMip = 0;
Render::Data::Device->CreateShaderResourceView(texture_blur, &srvDesc, &texture_srv);
ImGui::Image(texture_srv, ImVec2(dst.cols, dst.rows));

3 commits
C++
91.5%
C
8.5%
❄ImGui, Gaussian Blur, OpenCV, DirectX11
21
stars
3
commits
C++
primary language
Aug 12, 2024
updated

This is an application that combines ImGui for GUI rendering, OpenCV for image processing, and DirectX11 for graphics rendering. This project demonstrates how to use these libraries together to create a simple application that loads, processes, and displays images.
sudo apt-get install libopencv-dev
mkdir c:\src
cd c:\src
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
.\vcpkg.exe integrate install
.\vcpkg.exe integrate powershell
.\vcpkg.exe install opencv[contrib,core,dnn,freetype,jpeg,openmp,png,quirc,tiff,webp,world]:x64-windows
//with GaussianBlur image (example from https://github.com/JimmyHHua/opencv_tutorials/blob/master/python/code_022/opencv_022.py)
cv::Mat src = cv::imread("C:/image.jpg");
cv::Mat dst = ImageProcessor::ApplyGaussianBlur(src, 15);
ID3D11Texture2D* texture_blur = RenderUtils::LoadTextureFromMat(dst, Render::Data::Device, Render::Data::DeviceContext);
ID3D11ShaderResourceView* texture_srv = nullptr;
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
srvDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
srvDesc.Texture2D.MipLevels = 1;
srvDesc.Texture2D.MostDetailedMip = 0;
Render::Data::Device->CreateShaderResourceView(texture_blur, &srvDesc, &texture_srv);
ImGui::Image(texture_srv, ImVec2(dst.cols, dst.rows));

3 commits
C++
91.5%
C
8.5%