Display A Selected Image By OpenCV.js In Web Page

The post shows a simple example about how to display a selected image by opencv.js in web page. <div> <div class=”inputoutput”> <img id=”imageSrc” alt=”No Image” style=”display: none;”> <div class=”caption”><input type=”file” id=”fileInput” name=”file”></div> </div> <div class=”inputoutput”> <canvas id=”canvasOutput”></canvas> </div> </div> <script async=”” src=”/functions/opencv/opencv.js” type=”text/javascript”></script> <script type=”text/javascript”> let imgElement = document.getElementById(‘imageSrc’); let Read more…

Lomo Graphy By OpenCV

The article shows how to make the original image has a retro style. Two steps need to be done. Change the red color channel of the original image. Change the brightness by a filled circle. The mathematical function used in step1 makes the brighter pixel brighter, darker pixel darker.   Read more…

Simple Example Using OpenCV By CPP And Python

The article introduces how to display an image by OpenCV in CPlusPlus and Python language. The user can exit the whole program when he presses the ESC key. CPP CMakeLists.txt macro(use_cxx11) if (CMAKE_VERSION VERSION_LESS “3.1”) if (CMAKE_CXX_COMPILER_ID STREQUAL “GNU”) set (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=gnu++11”) endif () else () set (CMAKE_CXX_STANDARD 11) Read more…

Use OpenCV To Make Picture Brighter

Gamma correction is a very useful method to make the original image brighter. It is a non-linear transform for every input value, the relevant math equation is in the following section. O:output value I:input value #include <stdio.h> #include <opencv2/opencv.hpp> using namespace cv; int main(int argc, char** argv ) { Mat Read more…

Combine Images

The linear blend operator for two images: dst = α⋅src1+β⋅src2+γ we can use the following interface to support combine two pictures. CV_EXPORTS_W void addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype = -1); Notice: we need to use the images which have the same Read more…

Simple Examples For Handling Images With OpenCV

The original image and project are in the following part. CMakeLists.txt macro(use_cxx11) if (CMAKE_VERSION VERSION_LESS “3.1”) if (CMAKE_CXX_COMPILER_ID STREQUAL “GNU”) set (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=gnu++11”) endif () else () set (CMAKE_CXX_STANDARD 11) endif () endmacro(use_cxx11) cmake_minimum_required(VERSION 2.8) project( cvMat ) use_cxx11() find_package( OpenCV REQUIRED ) add_executable( ${PROJECT_NAME} “main.cpp” ) target_link_libraries( ${PROJECT_NAME} Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X