diff --git a/colors_hls_3d_line.py b/colors_hls_3d_line.py index e178ed3..a439c37 100755 --- a/colors_hls_3d_line.py +++ b/colors_hls_3d_line.py @@ -14,7 +14,9 @@ #file_nr = 11050 file_nr = 12000 -path = './s4/' +file_nr = 10000 + +path = './scans/s/' name1 = path + str(file_nr) + '.jpg' name2 = path + str(file_nr+1) + '.jpg' diff --git a/server.py b/server.py index d684b38..6d7c7a6 100755 --- a/server.py +++ b/server.py @@ -5,6 +5,7 @@ from PIL import Image import cv2 import numpy as np +import os # Start a socket listening for connections on 0.0.0.0:8000 (0.0.0.0 means # all interfaces) @@ -20,6 +21,10 @@ i = 10000 +path = './scans/s/' + +#os.mkdir(path) + try: while True: k = cv2.waitKey(1) & 0xFF @@ -42,7 +47,7 @@ image = cv2.transpose(image) image = cv2.flip(image, 0) cv2.imshow('image', image) - cv2.imwrite(str(i) + '.jpg',image) + cv2.imwrite(path + str(i) + '.jpg',image) i = i + 1 height, width, channels = image.shape diff --git a/utils/bayer_server/server.py b/utils/bayer_server/server.py index 8e5bcc8..3ad6f31 100755 --- a/utils/bayer_server/server.py +++ b/utils/bayer_server/server.py @@ -116,12 +116,13 @@ def getimg(stream): data = getimg(image_stream) # data = np.fromstring(image_stream.getvalue(), dtype=np.uint8) # image = cv2.imdecode(data,cv2.IMREAD_COLOR) - image=data - cv2.imshow('image', image) - cv2.imwrite(str(i) + '.jpg',image>>8) + image2=data + cv2.imshow('image', image2) + print image2.shape, image2.dtype + cv2.imwrite(str(i) + '.tif',image2) i = i + 1 - print image_len, image.shape + print image_len, image2.shape finally: connection.close()