Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行get_faces_from_camera_tkinter.py输入中文名,保存图片时 显示保存成功,但目录下没有,英文名字则没问题 #63

Open
mrfan98 opened this issue Aug 7, 2023 · 5 comments

Comments

@mrfan98
Copy link

mrfan98 commented Aug 7, 2023

No description provided.

@mrfan98
Copy link
Author

mrfan98 commented Aug 7, 2023

解决了,使用cv2.imencode即可

@Xiaopacai-xnld
Copy link

怎么弄的啊大佬

@1107dingjiaxin
Copy link

解决了,使用cv2.imencode即可
大佬,可以具体说说怎么改吗??在哪的地方改呢?

@coni233
Copy link
Contributor

coni233 commented Nov 4, 2024

使用Pillow保存图像就行了,OpenCV默认不支持非ASCII字符路径
img_pil = Image.fromarray(self.face_ROI_image)
img_pil.save(self.current_face_dir + "/img_face_" + str(self.ss_cnt) + ".jpg")

@1107dingjiaxin
Copy link

1107dingjiaxin commented Nov 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants