Python OpenCV line detection to detect `X` symbol in image

Instead of using cv2.HoughLines(), an alternative approach is to use template matching. The idea is to search and find the location of a template image in a larger image. To perform this method, the template slides over the input image (similar to 2D convolution) where comparison methods are performed to determine pixel similarity. This is … Read more

OpenGL Scale Single Pixel Line

There is no “320×240 glOrtho canvas”. There is only the window’s actual resolution: 960×720. All you are doing is scaling up the coordinates of the primitives you render. So, your code says to render a line from, for example, (20, 20) to (40, 40). And OpenGL (eventually) scales those coordinates by 3 in each dimension: … Read more