Category Archives: Image Processing

Fundus Image Segmentation

Source Code¶On my GitHub This code is wrapped in a class which makes it harder to post to a Notebook (a few too many lines for a post). Segmenting Fundus Images with kNN¶After preprocessing the images as described in a previous post, I tried to extract learnable features by applying the k-nearest neighbors algorithm. In… Read More »

Fast Image Pre-processing with OpenCV 2.4, C++, CUDA: Memory, CLAHE

Previous couple of posts describe some retina images pre-processing with OpenCV and IPython notebooks. Python is great but having to pre-process about 88,000 images (35,000 train and 53,000 test) I had my doubts about how long it would all take. Besides, I am a huge fan of CUDA, I have a GTX Titan GPU and… Read More »

Matched Filters with OpenCV

Creating Custom Filter Banks with OpenCV¶ Suppose in order to extract curved lines from the image, we create a bank of filters (matched filters) designed to illicit a response from line segments of different orientation. To reconstruct the curves we apply each filter in the bank to the given image and then return the maximum… Read More »

Color Transfer with OpenCV, Python

Color Transfer by Histogram Specification¶Auxilary functions (described in the previous post)¶ In [1]: %matplotlib inline from matplotlib import pyplot as plt from os import path import numpy as np import cv2 import pandas as pd # display a list of images with titles def show_images(images,titles=None, scale=1.3): """Display a list of images""" n_ims = len(images) if titles… Read More »

Image Processing with OpenCV and Python

The following few posts are a fallout from the Kaggle Diabetic Retinopathy Detection competition. I have been learning image processing with OpenCV 2.4/C++/GPU, Python 2.7, scikit-image, PIL, etc. It was a lot of fun. Finding the Eye¶We have a dataset of over 35,000 fundus images and we need to do some processing on them. Seems… Read More »