Open iairose opened 7 years ago
I have a sample problem fixing QAQ
I have fixed it
first err in the function 'get_stroke' :
imX = np.append(np.absolute(img[:, 0: width - 1] - img[:, 1: width]), np.zeros((height, 1)), axis=1)
imY = np.append(np.absolute(img[0: height - 1, :] - img[1: height, :]), np.zeros((1, width)), axis=0)
second err in the 'function get_eight_directions' :
y = int(half_len - int(round((x + 1 - half_len) * math.tan(math.pi * i / 8))))
some little err QAQ
in my opinion this issue can close.
can you give the color result code ?
the code only can use for picture which width is equal to height, and the result is for from the matlab code
Traceback (most recent call last): File "./pencil_draw.py", line 181, in
res = pencil_drawing(img_path, pencil_texture)
File "./pencil_draw.py", line 163, in pencil_drawing
S = get_stroke(img, 3, 8)
File "./pencil_draw.py", line 44, in get_stroke
img_gredient = imX + imY
ValueError: operands could not be broadcast together with shapes (668,460) (460,460)