odc_public icon indicating copy to clipboard operation
odc_public copied to clipboard

New question for Blender video

Open wangmyde opened this issue 4 years ago • 2 comments

Hi, I followed your steps in your video, but I didn't get the expected result. https://www.youtube.com/watch?v=Edk9uA5Yl5k&feature=youtu.be

I am not sure whether my steps were correct because I can't see what you typed on your keyboard. I have some questions w.r.t. your operation:

  1. In your video from 8:23 to 8:25, which key did you press on the keyboard to step out the "registration image to object" process? I asked it because I typed 'ESC' on the keyboard to be out of the process. But it seems that the program can catch nothing after this operation.

  2. I would like to know the whole process of how to use your program. Please correct the process I describe below:

  3. Open the blend file you upload

  4. import image_object_registration module

  5. deactivate the 'test camera' (I'm not sure whether it is necessary to do this step. I watched from your video)

  6. run 'Run me!' script

import sys

sys.path.append(r'I:\Blender_old\blender-2.78-windows64\2.78\scripts\modules\image_object_registration.py')

import image_object_registration
image_object_registration.register()
  1. call out the panel of "registration image to object"
  2. select 6 pairs of points in images and 3D model
  3. Here I DON'T KNOW what to input to be out of the selecting points process, but I pressed 'Esc' on keyboard.
  4. active the 'test camera' (I'm not sure whether it is necessary to do this step)
  5. run the script 'Camera matrix test'
import bpy
import image_object_registration as IOR
C = bpy.context

#these functions are useful!!
#get_blender_camera_from_3x4_P
#get_calibration_matrix_K_from_blender
#get_3x4_RT_matrix_from_blender
#get_3x4_P_matrix_from_blender

if C.object.type != 'CAMERA':
    print('not a camera')
    
else:

    P, K, RT = IOR.get_3x4_P_matrix_from_blender(C.object)

    print(P)

    IOR.get_blender_camera_from_3x4_P(P, 1)
  1. activate the 'CamFrom3x4PObj' camera
  2. view through the 'CamFrom3x4PObj' camera, then I would have seen the aligned image of 3D model as same as the 2D image. But nothing changed. Here is the images: 捕获

Could you let me know where I am wrong? I have taken one night to explore your program. I would be really grateful if you could correct me. Thanks.

wangmyde avatar May 06 '20 23:05 wangmyde

I am glad you were able to get the code running! The results I could get were never perfect. I actually made this video to ask for help from other programmers since my results were not what I wanted. I have not been able to advance beyond the results you have. With extremely careful placement of your 3d and image points it can be decent.

On Wed, May 6, 2020 at 7:58 PM My Wang [email protected] wrote:

Hi, I followed your steps in your video, but I didn't get the expected result. https://www.youtube.com/watch?v=Edk9uA5Yl5k&feature=youtu.be

I am not sure whether my steps were correct because I can't see what you typed on your keyboard. I have some questions w.r.t. your operation is:

In your video from 8:23 to 8:25, which key did you type to step out the "registration image to object" process? I asked it because I typed 'ESC' on the keyboard to be out of the process. But it seems that the program can catch nothing with this operation. 2.

I would like to know the whole process of using your program. Please correct the process I describe below: 3.

Open the blend file you upload 4.

import image_object_registration module 5.

deactivate the 'test camera' (I'm not sure whether it is necessary to do this step) 6.

run 'Run me!' script

import sys

sys.path.append(r'I:\Blender_old\blender-2.78-windows64\2.78\scripts\modules\image_object_registration.py')

import image_object_registration

image_object_registration.register()

  1. call out the panel of "registration image to object"
  2. select 6 pairs of points in images and 3D model
  3. Here I DON'T KNOW what to input to be out of the selecting points process, but I press 'Esc' on keyboard.
  4. active the 'test camera' (I'm not sure whether it is necessary to do this step)
  5. run the script 'Camera matrix test'

import bpy

import image_object_registration as IOR

C = bpy.context

#these functions are useful!!

#get_blender_camera_from_3x4_P

#get_calibration_matrix_K_from_blender

#get_3x4_RT_matrix_from_blender

#get_3x4_P_matrix_from_blender

if C.object.type != 'CAMERA':

print('not a camera')

else:

P, K, RT = IOR.get_3x4_P_matrix_from_blender(C.object)



print(P)



IOR.get_blender_camera_from_3x4_P(P, 1)
  1. activate the 'CamFrom3x4PObj' camera
  2. view through the 'CamFrom3x4PObj' camera, then I would have seen the align image of 3D model as same as the 2D image. But nothing changed. Here is the images: [image: 捕获] https://user-images.githubusercontent.com/23552421/81239859-3add3300-9006-11ea-843d-fc0b9de831aa.PNG

Could you let me know where I am wrong? I have taken one night to explore your program. I would be really grateful if you could correct me. Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/patmo141/odc_public/issues/66, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWIK33ETF3FV7LTMUPVWLLRQH2S7ANCNFSM4M23ZLDA .

patmo141 avatar May 07 '20 00:05 patmo141

Regarding between #5 and #6 in your question

#5 run the operator from the spacebar menu and select 6 (or more) corresponding points #5a press "M" on the keyboard to generate the matrix #6 press "Enter" to confirm or "Esc" to get out of the points operator

patmo141 avatar May 07 '20 00:05 patmo141