τα στοιχεία επικοινωνίας μου
Ταχυδρομείο[email protected]
2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
Οι κάμερες δομημένου φωτός της Mech Mind, ειδικά η σειρά Mech-Eye, είναι τρισδιάστατες κάμερες υψηλής ακρίβειας βιομηχανικής ποιότητας που χρησιμοποιούνται ευρέως στον βιομηχανικό αυτοματισμό, την πλοήγηση με ρομπότ, την επιθεώρηση ποιότητας και άλλους τομείς. Ακολουθεί μια λεπτομερής ανάλυση της κάμερας δομημένου φωτός Mech Mind:
Οι κάμερες δομημένου φωτός της Mech Mind, όπως η Mech-Eye PRO, χρησιμοποιούν τεχνολογία δομημένου φωτός υψηλής ταχύτητας για να παρέχουν εξαιρετική αντίσταση στο φως περιβάλλοντος διατηρώντας παράλληλα υψηλή ακρίβεια και ταχύτητα. Αυτές οι κάμερες συνήθως περιέχουν πλούσια ενότητες αλγορίθμου όρασης και μπορούν να εφαρμοστούν σε πολλά τυπικά πρακτικά σενάρια, όπως η κατασκευή φόρτωσης και εκφόρτωσης τεμαχίου, τοποθέτηση υψηλής ακρίβειας, συναρμολόγηση, σύσφιξη βιδών και ακαδημαϊκή έρευνα.
Η κάμερα δομημένου φωτός της Mech Mind χρησιμοποιεί κυρίως την αρχή της προβολής δομημένου φωτός. Προβάλλουν συγκεκριμένα μοτίβα (όπως δομημένο φως που παράγεται από λέιζερ) στο αντικείμενο που φωτογραφίζεται και το περίγραμμα και το σχήμα του αντικειμένου καταγράφονται από την κάμερα. Αυτή η τεχνολογία μπορεί να υπολογίσει με ακρίβεια τη θέση και το σχήμα ενός αντικειμένου αναλύοντας την ανάκλαση και τη διάθλαση του φωτός στο αντικείμενο.
Οι κάμερες δομημένου φωτός της Mech Mind χρησιμοποιούνται ευρέως στα αυτοκίνητα, την αεροπορία, την κατασκευή καλουπιών, τον βιομηχανικό αυτοματισμό και άλλους τομείς. Στον τομέα της αυτοκινητοβιομηχανίας, μπορούν να λάβουν γρήγορα και με ακρίβεια τις πληροφορίες σχήματος της επιφάνειας του αμαξώματος του αυτοκινήτου στον τομέα της αεροπορίας, μπορούν να λάβουν τις τρισδιάστατες πληροφορίες σχήματος του αεροσκάφους, παρέχοντας ακριβή υποστήριξη δεδομένων για το σχεδιασμό και την κατασκευή του αεροσκάφους. .
Οι κάμερες δομημένου φωτός της Mech Mind παίζουν σημαντικό ρόλο σε τομείς όπως ο βιομηχανικός αυτοματισμός και η πλοήγηση ρομπότ λόγω της υψηλής ακρίβειας, της υψηλής ταχύτητας, του μεγάλου οπτικού πεδίου, του μεγάλου βάθους πεδίου, της ισχυρής αντίστασης στο φως του περιβάλλοντος και της σταθερότητας και αξιοπιστίας τους. Με τη συνεχή πρόοδο της τεχνολογίας και τη συνεχή επέκταση των σεναρίων εφαρμογών, οι κάμερες δομημένου φωτός της Mech Mind αναμένεται να επιδείξουν τη μοναδική τους αξία σε περισσότερους τομείς.
Δημιουργήστε ένα εικονικό περιβάλλον
Κατεβάστε το πακέτο opencv-python
Κατεβάστε το πακέτο λήψης κάμερας Mecamander
- 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 και τρισδιάστατες εικόνες
- 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()