Ask Your Question

NuclearBacteria's profile - activity

2016-07-03 17:50:47 -0600 received badge  Scholar (source)
2016-07-03 17:50:43 -0600 answered a question Cv2.findTransformECC is causing blue screen

Upgrading the graphic driver solved the problem.

2016-07-03 17:50:28 -0600 commented question Cv2.findTransformECC is causing blue screen

Well the ram is fine (I runned memtest all the night), upgrading the graphic driver solved the problem.

2016-07-01 06:57:39 -0600 asked a question Cv2.findTransformECC is causing blue screen

Hi, each time I try to run this code I'm getting a blue screen. Is openCv bugged?

this is a laptop with windows 8.1, no hardware modification, python 2.7x64 installed and openCv 3.1 x64 cv2.py is used

report incriminate ntoskrnl.exe

code :

def align_images_better(images):
    """
    Aligne all the images according to the first image in the folder
        -images : (list(image object)) unaligned images
        -return : (list(image object)) aligned images
    """

    aligned_images = []
    aligned_images.append(images[0])

    im1_gray = cv2.cvtColor(images[0], cv2.COLOR_BGR2GRAY)
    # Find size of image1
    sz = images[0].shape
    warp_matrix = np.eye(3, 3, dtype=np.float32)
    number_of_iterations = 5000;
    termination_eps = 1e-10;
    criteria = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, number_of_iterations,  termination_eps)
    warp_mode = cv2.MOTION_HOMOGRAPHY

    for image in images[1:]:
        print "aligning picture"
        im2_gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
        print "findTransformECC"
        (cc, warp_matrix) = cv2.findTransformECC (im1_gray,im2_gray,warp_matrix, warp_mode, criteria)
        print "warping perspective"
        im2_aligned = cv2.warpPerspective (image, warp_matrix, (sz[1],sz[0]), flags=cv2.INTER_LINEAR + cv2.WARP_INVERSE_MAP)
        aligned_images(im2_aligned)

    return aligned_images

Thanks.