Executing cv::warpPerspective for a fake deskewing on a set of cv::Point

I’m trying to do a perspective transformation of a set of points in order to achieve a deskewing effect: http://nuigroup.com/?ACT=28&fid=27&aid=1892_H6eNAaign4Mrnn30Au8d I’m using the image below for tests, and the green rectangle display the area of interest. I was wondering if it’s possible to achieve the effect I’m hoping for using a simple combination of cv::getPerspectiveTransform … Read more

Removing watermark out of an image using OpenCV

First of all I have this image and I want to make an application that can detect images like it and remove the circle (watermark) from it. int main(){ Mat im1,im2,im3,gray,gray2,result; im2=imread(” (2).jpg”); namedWindow(“x”,CV_WINDOW_FREERATIO); imshow(“x”,im2); //converting it to gray cvtColor(im2,gray,CV_BGR2GRAY); // creating a new image that will have the cropped ellipse Mat ElipseImg(im2.rows,im2.cols,CV_8UC1,Scalar(0,0,0)); //detecting the … Read more

Only PNG supports transparency, is that true?

I found JPG does not support transparency, the alpha value is always 255. I am wondering only png supports transparency? Answer png-32 supports different levels of transparency. Each pixel can have an opacity between 0 and 255, with 0 as completely transparent. png-24 supports setting one color as fully transparent. Everything else will be opaque. … Read more

Extracting a region from an image using slicing in Python, OpenCV

I have an image and I want to extract a region from it. I have coordinates of left upper corner and right lower corner of this region. In gray scale I do it like this: I = cv2.imread(“lena.png”) I = cv2.cvtColor(I, cv2.COLOR_RGB2GRAY) region = I[248:280,245:288] tools.show_1_image_pylab(region) I can’t figure it out how to do it … Read more

PHP script to render a single transparent pixel (PNG or GIF)

I have to create a PHP that will return an image stream of one transparent dot (PNG or GIF) Could you point me to an easy to use solution? Answer Transparent 1×1 PNG: header(‘Content-Type: image/png’); echo base64_decode(‘iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=’); Transparent 1×1 GIF: header(‘Content-Type: image/gif’); echo base64_decode(‘R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw==’); AttributionSource : Link , Question Author : Community , Answer Author … Read more

Classification of detectors, extractors and matchers

I am new to opencv and trying to implement image matching between two images. For this purpose, I’m trying to understand the difference between feature descriptors, descriptor extractors and descriptor matchers. I came across a lot of terms and tried to read about them on the opencv documentation website but I just can’t seem to … Read more