2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
मेक् माइण्ड् इत्यस्य संरचिताः प्रकाशकॅमेराः विशेषतः मेक्-आइ श्रृङ्खला औद्योगिक-स्तरीयाः उच्च-सटीक-3D-कैमराः सन्ति येषां उपयोगः औद्योगिकस्वचालनम्, रोबोट्-सञ्चारः, गुणवत्तानिरीक्षणम् इत्यादिषु क्षेत्रेषु व्यापकरूपेण भवति मेक माइण्ड् संरचितस्य प्रकाशकॅमेरा इत्यस्य विस्तृतं विश्लेषणं निम्नलिखितम् अस्ति ।
मेक माइण्ड् इत्यस्य संरचितप्रकाशकैमराः, यथा मेक-आइ पीआरओ, उच्चगतिसंरचितप्रकाशप्रौद्योगिक्याः उपयोगं कुर्वन्ति येन उच्चसटीकतां गतिं च निर्वाहयन् उत्तमं परिवेशप्रकाशप्रतिरोधं प्रदातुं शक्यते एतेषु कॅमेरासु प्रायः समृद्धदृष्टि-एल्गोरिदम्-मॉड्यूलः भवति तथा च अनेकेषु विशिष्टेषु व्यावहारिक-परिदृश्येषु प्रयोक्तुं शक्यते, यथा निर्माण-कार्य-खण्डस्य लोडिंग्-अनलोडिंग्, उच्च-सटीक-स्थापनम्, संयोजनं, पेच-कठनीकरणं, शैक्षणिक-अनुसन्धानं च
मेक् माइण्ड् इत्यस्य संरचितप्रकाशकॅमेरा मुख्यतया संरचितप्रकाशप्रक्षेपणस्य सिद्धान्तस्य उपयोगं करोति । ते विशिष्टानि प्रतिमानाः (यथा लेसरद्वारा उत्पद्यमानं संरचितप्रकाशं) छायाचित्रं क्रियमाणस्य वस्तुनः उपरि प्रक्षेपयन्ति, तस्य वस्तुनः रूपरेखा आकारः च कॅमेराद्वारा गृह्यते एषा प्रौद्योगिक्याः वस्तुनः उपरि प्रकाशस्य प्रतिबिम्बस्य अपवर्तनस्य च विश्लेषणं कृत्वा वस्तुनः स्थितिः आकारः च समीचीनतया गणयितुं शक्नोति ।
मेक् माइण्ड् इत्यस्य संरचितप्रकाशकॅमेराणां उपयोगः वाहन, विमानन, मोल्ड् निर्माण, औद्योगिकस्वचालनम् इत्यादिषु क्षेत्रेषु बहुधा भवति । वाहनक्षेत्रे ते शीघ्रं सटीकतया च कारस्य शरीरस्य पृष्ठस्य आकारसूचनाः प्राप्तुं शक्नुवन्ति; .
मेक माइण्ड् इत्यस्य संरचितप्रकाशकैमरा औद्योगिकस्वचालनम्, रोबोट् नेविगेशन इत्यादिषु क्षेत्रेषु महत्त्वपूर्णां भूमिकां निर्वहन्ति यतोहि तेषां उच्चसटीकता, उच्चगतिः, विशालदृश्यक्षेत्रं, विशालक्षेत्रगहनता, परिवेशप्रकाशस्य प्रति प्रबलप्रतिरोधः, स्थिरता च विश्वसनीयता च भवति प्रौद्योगिक्याः निरन्तरं उन्नतिः, अनुप्रयोगपरिदृश्यानां निरन्तरविस्तारेण च मेक माइण्ड् इत्यस्य संरचितप्रकाशकैमराः अधिकक्षेत्रेषु स्वस्य अद्वितीयं मूल्यं प्रदर्शयिष्यन्ति इति अपेक्षा अस्ति
आभासी वातावरणं रचयन्तु
opencv-python संकुलं डाउनलोड् कुर्वन्तु
Mecamander Camera Capture Package इत्येतत् डाउनलोड् कुर्वन्तु
- pip install MechEyeAPI
- pip install python-opencv
कॅमेरा संयोजयन्तु
- def ConnectCamera(self):
- camera_infos = Camera.discover_cameras()
- if len(camera_infos) != 1:
- print("相机连接出现异常,检查网线")
- return
- error_status = self.camera.connect(camera_infos[0])
- if not error_status.is_ok():
- show_error(error_status)
- return
कॅमेरा विच्छेदं कुर्वन्तु
- def DisConnectCamera(self):
- self.camera.disconnect()
- print("Disconnected from the camera successfully.")
2D चित्राणि 3D चित्राणि च संग्रहयन्तु
- def connect_and_capture(self):
-
- # Obtain the 2D image resolution and the depth map resolution of the camera.
- resolution = CameraResolutions()
- show_error(self.camera.get_camera_resolutions(resolution))
- print_camera_resolution(resolution)
-
- time1 = time.time()
- # Obtain the 2D image.
- frame2d = Frame2D()
- show_error(self.camera.capture_2d(frame2d))
- row, col = 222, 222
- color_map = frame2d.get_color_image()
- print("The size of the 2D image is {} (width) * {} (height).".format(
- color_map.width(), color_map.height()))
- rgb = color_map[row * color_map.width() + col]
- print("The RGB values of the pixel at ({},{}) is R:{},G:{},B{}n".
- format(row, col, rgb.b, rgb.g, rgb.r))
-
- Image2d = color_map.data()
-
- time2 = time.time()
- print('grab 2d image : '+str((time2-time1)*1000)+'ms')
-
-
- # if not confirm_capture_3d():
- # return
-
- # Obtain the depth map.
- frame3d = Frame3D()
- show_error(self.camera.capture_3d(frame3d))
- depth_map = frame3d.get_depth_map()
- print("The size of the depth map is {} (width) * {} (height).".format(
- depth_map.width(), depth_map.height()))
- depth = depth_map[row * depth_map.width() + col]
- print("The depth value of the pixel at ({},{}) is depth :{}mmn".
- format(row, col, depth.z))
- Image3d = depth_map.data()
- time3 = time.time()
- print('grab depth image : '+str((time3-time2)*1000)+'ms')
-
-
- return Image2d,Image3d
- # Obtain the point cloud.
- # point_cloud = frame3d.get_untextured_point_cloud()
- # print("The size of the point cloud is {} (width) * {} (height).".format(
- # point_cloud.width(), point_cloud.height()))
- # point_xyz = point_cloud[row * depth_map.width() + col]
- # print("The coordinates of the point corresponding to the pixel at ({},{}) is X: {}mm , Y: {}mm, Z: {}mmn".
- # format(row, col, point_xyz.x, point_xyz.y, point_xyz.z))
- # With this sample, you can connect to a camera and obtain the 2D image, depth map, and point cloud data.
- import time
-
- from mecheye.shared import *
- from mecheye.area_scan_3d_camera import *
- from mecheye.area_scan_3d_camera_utils import *
- import cv2
-
-
- class ConnectAndCaptureImages(object):
- def __init__(self):
- self.camera = Camera()
-
- def connect_and_capture(self):
-
- # Obtain the 2D image resolution and the depth map resolution of the camera.
- resolution = CameraResolutions()
- show_error(self.camera.get_camera_resolutions(resolution))
- print_camera_resolution(resolution)
-
- time1 = time.time()
- # Obtain the 2D image.
- frame2d = Frame2D()
- show_error(self.camera.capture_2d(frame2d))
- row, col = 222, 222
- color_map = frame2d.get_color_image()
- print("The size of the 2D image is {} (width) * {} (height).".format(
- color_map.width(), color_map.height()))
- rgb = color_map[row * color_map.width() + col]
- print("The RGB values of the pixel at ({},{}) is R:{},G:{},B{}n".
- format(row, col, rgb.b, rgb.g, rgb.r))
-
- Image2d = color_map.data()
-
- time2 = time.time()
- print('grab 2d image : '+str((time2-time1)*1000)+'ms')
-
-
- # if not confirm_capture_3d():
- # return
-
- # Obtain the depth map.
- frame3d = Frame3D()
- show_error(self.camera.capture_3d(frame3d))
- depth_map = frame3d.get_depth_map()
- print("The size of the depth map is {} (width) * {} (height).".format(
- depth_map.width(), depth_map.height()))
- depth = depth_map[row * depth_map.width() + col]
- print("The depth value of the pixel at ({},{}) is depth :{}mmn".
- format(row, col, depth.z))
- Image3d = depth_map.data()
- time3 = time.time()
- print('grab depth image : '+str((time3-time2)*1000)+'ms')
-
-
- return Image2d,Image3d
- # Obtain the point cloud.
- # point_cloud = frame3d.get_untextured_point_cloud()
- # print("The size of the point cloud is {} (width) * {} (height).".format(
- # point_cloud.width(), point_cloud.height()))
- # point_xyz = point_cloud[row * depth_map.width() + col]
- # print("The coordinates of the point corresponding to the pixel at ({},{}) is X: {}mm , Y: {}mm, Z: {}mmn".
- # format(row, col, point_xyz.x, point_xyz.y, point_xyz.z))
-
- def main(self):
- # List all available cameras and connect to a camera by the displayed index.
- if find_and_connect(self.camera):
- d2,d3 = self.connect_and_capture()
- self.camera.disconnect()
- print("Disconnected from the camera successfully.")
- return d2,d3
-
- def GrabImages(self):
- d2, d3 = self.connect_and_capture()
- return d2, d3
-
- def ConnectCamera(self):
- camera_infos = Camera.discover_cameras()
- if len(camera_infos) != 1:
- print("相机连接出现异常,检查网线")
- return
- error_status = self.camera.connect(camera_infos[0])
- if not error_status.is_ok():
- show_error(error_status)
- return
- def DisConnectCamera(self):
- self.camera.disconnect()
- print("Disconnected from the camera successfully.")
-
-
-
-
-
- if __name__ == '__main__':
-
- #pip install MechEyeAPI
-
- print('初始化相机对象')
- MechMindGraber = ConnectAndCaptureImages()
- # d2,d3 = a.main()
- print('连接相机')
- MechMindGraber.ConnectCamera()
-
- for i in range(60):
- print(str(i)+'rn')
- print('采集亮度图和深度图')
- d2,d3 = MechMindGraber.GrabImages()
-
-
- cv2.imshow('1',d2)
- cv2.waitKey()
- cv2.imshow('1', d3)
- cv2.waitKey()
- print('断开连接')
- MechMindGraber.DisConnectCamera()