Ask Your Question

Cv2.findTransformECC is causing blue screen

asked 2016-07-01 06:30:52 -0500

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 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 = []

    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)

    return aligned_images


edit retag flag offensive close merge delete


It seems the BSOD is triggered by faulty RAM which can point to two things

  1. There is a RAM location that is corrupt and thus every time you software tries to write or read there you get the BSOD. This can only be solved by finding the corrupt RAM. Have had the same problem before. Only thing to do is remove one stick, reboot, check if crash happens again or not. If it stays away, throw away that single RAM stick
  2. It could also be due to illegal memory access, but in general that shouldn't be allowed to throw a BSOD...
StevenPuttemans gravatar imageStevenPuttemans ( 2016-07-01 07:17:00 -0500 )edit

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

NuclearBacteria gravatar imageNuclearBacteria ( 2016-07-03 17:50:28 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-07-03 17:50:43 -0500

Upgrading the graphic driver solved the problem.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-07-01 06:30:52 -0500

Seen: 408 times

Last updated: Jul 03 '16