Skimage SimilarityTransform破坏图像

时间:2016-03-12 13:55:35

标签: python image image-processing image-recognition scikit-image

我有一个识别图像上面部的代码(dlib实现,68分)

我想稍微旋转一些图像,但是在遇到以下麻烦之后:我的图像变得某种程度上被宠坏了

plt.imshow(img) #the right picture (matplotlib)
win = dlib.image_window() #the left picture (dlib)
win.set_image(img) #the left picture

我用两种方式绘制图像:

{{1}}

正如您所见,dlib图像已损坏。也可以找到面部关键点停止工作的算法。

没有SimilarityTransform dlib正常工作。

请帮帮我!我想旋转图像并将其传递给dlib

the prolem

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。

我只需要用img_as_ubyte转换图像

from skimage import img_as_ubyte
img = img_as_ubyte(tf.warp(img,tform))