c++ - Speeding up OpenCV's input response -
i writing first opencv program , playing around image manipulation using camera on macbook. code below shows camera , allows me press 0 normal view, 1 , 2 , or 3 change grb , 4 change black , white. unfortunately, have hold down key respond. causes delay , how can code more responsive input? #include "opencv2/core/core.hpp" #include "opencv2/flann/miniflann.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/photo/photo.hpp" #include "opencv2/video/video.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/ml/ml.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/core/core_c.h" #include "opencv2/highgui/highgui_c.h" #include "opencv2/imgproc/imgproc_c.h" using namespace cv; using namespace std; mat channel(mat a, int ich) { m...