Пример #1
0
num_beads = FO.find_objects(1000, 1000, \
                            img_array, \
                            beadpos_xcol, beadpos_yrow, \
                            segmask_image)
print("The number of beads found: %d" % num_beads)
MapFunc.convertPicPNG2(16383-img_array,0,1)
MapFunc.convertPicPNG2(segmask_image*65535, 0,2)
#MapFunc.convertPicPNG(segmask_image*65535+img_array, 0,3)



print("phase ONE complete!!!!!!!!!!!!!")
PC.cameraClose() # also frees up image buffer memory

#MapFunc.illum_bitmap()
MapFunc.illum_vector(beadpos_yrow,beadpos_xcol)

time.sleep(1)
PC.py_snapPtr(img_array2,.35,80,my_color)
MapFunc.convertPicPNG2(img_array2,0,3)

PC.cameraClose() # also frees up image buffer memory

imR = Image.open("map_0_1" +".png") # just beads
imG = Image.open("map_0_3" +".png") # the selected illuminated beads
imB = Image.open("map_0_2" +".png") # the found beads
im = Image.new('RGB', (1000,1000))
pix = im.load()
pixR = imR.load()
pixB = imB.load()
pixG = imG.load()