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

fix plt.imshow BGR image #5122

Closed
wants to merge 1 commit into from

Conversation

WZMIAOMIAO
Copy link
Contributor

@WZMIAOMIAO WZMIAOMIAO commented Dec 29, 2021

文档中有多处使用opencv读取图片,然后直接使用plt.imshow的方式进行可视化,中间漏了一步将BGR转RGB的过程。例如:

# 4. 可视化检测结果
image = cv2.imread(img_path)
boxes = [line[0] for line in result]
for box in result:
    box = np.reshape(np.array(box), [-1, 1, 2]).astype(np.int64)
    image = cv2.polylines(np.array(image), [box], True, (255, 0, 0), 2)

# 画出读取的图片
plt.figure(figsize=(10, 10))
plt.imshow(image)

image

@paddle-bot-old
Copy link

Thanks for your contribution!

an1018 pushed a commit to an1018/PaddleOCR that referenced this pull request Aug 17, 2022
@paddle-bot paddle-bot bot closed this Sep 5, 2023
@paddle-bot
Copy link

paddle-bot bot commented Sep 5, 2023

Automatically closed by Paddle-bot.

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

Successfully merging this pull request may close these issues.

1 participant