You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what you want to implement and what the issue & the steps to reproduce it are:
Using this rospackage i am able to receive the images from the baslar polar camera and my goal is to be able to extract the different intensities, colors and stokes from each superpixel.
i am setting my image_encoding to: image_encoding: "bayer_rggb16" and using this code i am trying to acces the 2x2 matrix :
# Convert the ROS Image message to a NumPy array
image = self.bridge.imgmsg_to_cv2(msg, desired_encoding='bayer_rggb16')
# Initialize arrays to hold polarization data
P0 = np.zeros((int(image.shape[0]/2), int(image.shape[1]/2)), dtype=np.uint16)
P45 = np.zeros((int(image.shape[0]/2), int(image.shape[1]/2)), dtype=np.uint16)
P90 = np.zeros((int(image.shape[0]/2), int(image.shape[1]/2)), dtype=np.uint16)
P135 = np.zeros((int(image.shape[0]/2), int(image.shape[1]/2)), dtype=np.uint16)
# Extract polarization channels from the image
for i in range(0, image.shape[0], 2):
for j in range(0, image.shape[1], 2):
super_pixel = image[i:i+2, j:j+2]
P0[int(i/2), int(j/2)] = super_pixel[0,0]
P45[int(i/2), int(j/2)] = super_pixel[1,0]
P90[int(i/2), int(j/2)] = super_pixel[1,1]
P135[int(i/2), int(j/2)] = super_pixel[0,1]
# Example of displaying one of the images (e.g., P0)
cv2.imshow("P0", P0)
cv2.imshow("P45", P45)
cv2.imshow("P90", P90)
cv2.imshow("P135", P135)
cv2.waitKey(1)
but still i think this is not the right way to access the intensities. is there a way to be sure? or an example of how to do this?
Hardware setup description
i have an acA2440-75uc POL
running on ROS noetic with ubuntu 20.04
Runtime information
running on ROS noetic with ubuntu 20.04
Is your camera operational with the Basler pylon Viewer on your platform?
Yes
The text was updated successfully, but these errors were encountered:
@zarathacia we appreciate your post here, but I would recommend approaching the official Basler support in regard to the mentioned polarized camera instead.
Cheers
@m-binev thank you for the response i have indeed contacted the official Basler support and i would like to make sure that the pylon ROS packages is publishing the RAW images from the camera. Is there a way to set the package to do it? or is the default setting already give the raw images?
Describe what you want to implement and what the issue & the steps to reproduce it are:
Using this rospackage i am able to receive the images from the baslar polar camera and my goal is to be able to extract the different intensities, colors and stokes from each superpixel.
i am setting my image_encoding to: image_encoding: "bayer_rggb16" and using this code i am trying to acces the 2x2 matrix :
# Convert the ROS Image message to a NumPy array
image = self.bridge.imgmsg_to_cv2(msg, desired_encoding='bayer_rggb16')
but still i think this is not the right way to access the intensities. is there a way to be sure? or an example of how to do this?
Hardware setup description
i have an acA2440-75uc POL
running on ROS noetic with ubuntu 20.04
Runtime information
Is your camera operational with the Basler pylon Viewer on your platform?
Yes
The text was updated successfully, but these errors were encountered: