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

3d模型中68 个点的位置示意图请问哪里有啊?翻了一下吖吖云播cece ID没有找到 #20

Open
xubin19939 opened this issue Sep 16, 2019 · 2 comments

Comments

@xubin19939
Copy link

No description provided.

@yinguobing
Copy link
Owner

示意图可以自己尝试画一个。另外”吖吖云播cece ID“是什么?

@imistyrain
Copy link

画图的代码:

import numpy as np
import cv2

filename = "model.txt"
model_points = []
raw_value = []
with open(filename) as file:
    for line in file:
        raw_value.append(line)
    model_points = np.array(raw_value, dtype=np.float32)
    model_points = np.reshape(model_points, (3, -1)).T
    # model_points *= 4
    model_points[:, -1] *= -1

img = np.zeros((800,800,3),dtype=np.uint8)
#img *= 255
center = (400,400)
for i,p in enumerate(model_points):
    x = int(center[0]+p[0]*4)
    y = int(center[1]+p[1]*4)
    cv2.putText(img,str(i),(x,y),1,1,(0,0,255))
    cv2.circle(img,(x,y),2,(255,0,0))
cv2.imshow("img",img)
cv2.imwrite("marks.png",img)
cv2.waitKey()

marks

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

3 participants