Closed ZhouSongxin closed 4 years ago
Can you check the resolution of the image being published by running rostopic echo /camera_array/cam0/image_raw --noarr
for the appropriate topic name.
Also make sure you have set binning=1
to make sure you get the high resolution from the camera.
Can you check the resolution of the image being published by running
rostopic echo /camera_array/cam0/image_raw --noarr
for the appropriate topic name. Also make sure you have setbinning=1
to make sure you get the high resolution from the camera.
header: seq: 436 stamp: secs: 1593438160 nsecs: 400452116 frame_id: "cam_0_optical_frame" height: 1024 width: 1224 encoding: "mono8" is_bigendian: 0 step: 1224 data: "<array type: uint8, length: 1253376>"
there is only an angle picture from the polarization mono.but in fact, the result should have a picture mixed with four angle polarized_picture ,the resolution should 2048*2448
I am not familiar with this camera and don't know what you mean by angle picture.
Sounds like your binning is set to 2, which is reducing your resolution. if you set it to 1 it will increase the image size by factor of 4.
my test_params.yaml file as follow: cam_ids:
save_path: /home/coostar/Desktop/polarizatonImg save_type: .bmp #binary or .tiff or .bmp binning: 1 # going from 2 to 1 requires cameras to be unplugged and replugged
distortion_model: plumb_bob image_height: 2048 image_width: 2448 distortion_coeffs:
intrinsic_coeffs:
rectification_coeffs:
projection_coeffs:
And the acquisition_node.launch:
Thank you
What are the settings in your launch file. The binning will be overwritten by the launch file as per the note "Assign all the following via launch file to prevent confusion and conflict"
@shahvi I use the defult setting:
my sensor's resolution should 20482448, but img published by ROS is 10241224
When you run the launch file, all the settings in the node are printed out. Can you find the line with something like:
[ INFO] [1593139408.761924476]: Binning set to: 2
print [ INFO] [1593441202.661072730]: Binning set to: 1 in my computer roslaunch spinnaker_sdk_camera_driver acquisition_node.launch ... logging to /home/coostar/.ros/log/54bf144e-ba15-11ea-a04d-283a4d36ae91/roslaunch-coostar-3031.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://coostar:46733/
PARAMETERS
NODES / acquisition_node (spinnaker_sdk_camera_driver/acquisition_node)
ROS_MASTER_URI=http://localhost:11311
process[acquisition_node-1]: started with pid [3054] [ INFO] [1593441202.654365873]: [ OK ] USB memory: 1000 MB [ INFO] [1593441202.654422152]: PARAMETER SETTINGS [ INFO] [1593441202.654437815]: ** Date = 20200629 [ INFO] [1593441202.654912174]: Save path set via parameter to: /home/coostar [ INFO] [1593441202.654937384]: Camera IDs:
[ INFO] [1593441202.655755872]: Camera Aliases: [ INFO] [1593441202.655768837]: 19060278 >> cam0 [ INFO] [1593441202.656464901]: Unique time stamps for each camera: false [ INFO] [1593441202.656777728]: color set to: false [ INFO] [1593441202.657222449]: Exporting images to ROS: true [ INFO] [1593441202.657701021]: Showing live images setting: false [ INFO] [1593441202.658161059]: Showing grid-style live images setting: false [ INFO] [1593441202.658578244]: Max Rate Save Mode: false [ INFO] [1593441202.658953972]: Displaying timing details: false [ INFO] [1593441202.659316011]: No. of images to skip set to: 20 [ INFO] [1593441202.659673293]: Init sleep delays set to : 1.00 sec [ WARN] [1593441202.660035495]: 'fps' Parameter not set, using default behavior: fps=20.00 [ INFO] [1593441202.660399829]: 'exposure_time'=0, Setting autoexposure [ INFO] [1593441202.660738353]: 'target_grey_value'=0, Setting AutoExposureTargetGreyValueAuto to Continuous/ auto [ INFO] [1593441202.661072730]: Binning set to: 1 [ INFO] [1593441202.661397138]: Using Software rate control, rate set to: 20 [ INFO] [1593441202.661810970]: Saving images set to: 0 [ INFO] [1593441202.662219593]: Camera Intrinsic Paramters: [ INFO] [1593441202.662302446]: 1886.923214 0.000000 604.721488 0.000000 1886.666877 493.477267 0.000000 0.000000 1.000000 [ INFO] [1593441202.662703625]: Camera Distortion Paramters: [ INFO] [1593441202.662729865]: -0.021142 -0.373387 2.385983 3.282457 [ INFO] [1593441202.663140210]: Camera Rectification Paramters: [ INFO] [1593441202.663169055]: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 [ INFO] [1593441202.663561694]: Camera Projection Paramters: [ INFO] [1593441202.663591233]: 913.700317 0.000000 953.448302 0.000000 0.000000 1063.296631 777.871993 0.000000 0.000000 0.000000 1.000000 0.000000 [ INFO] [1593441202.663600989]: Camera coeffs provided, camera info messges will be published. [ INFO] [1593441202.663616269]: Creating system instance... [ INFO] [1593441202.665719969]: Retreiving list of cameras... [ INFO] [1593441203.888901419]: Numer of cameras found: 1 [ INFO] [1593441203.888993232]: Cameras connected: 1
[ INFO] [1593441203.998725955]: Dynamic Reconfigure: Level : 4294967295 [ INFO] [1593441204.000991652]: FLUSH SEQUENCE [ INFO] [1593441204.001039305]: Initializing cameras... [ INFO] [1593441204.297724706]: Deinitializing cameras... [ INFO] [1593441204.302247689]: All cameras deinitialized. [ INFO] [1593441206.302449751]: Initializing cameras... [ INFO] [1593441206.640303284]: ACQUISITION
Unfortunately without having a camera to play with, I can't be of much help.
One thing I can suggest is to look at all the settings that work for you in SpinView and replicate it on the ROS driver. All the settings are set on the camera at: https://github.com/neufieldrobotics/spinnaker_sdk_camera_driver/blob/2f9f14df0dcff7b4d5e1559abad8715f68d02170/src/capture.cpp#L605
I found the size of rostopic of image published by the project, a raw bmp image format is about 5M, but the img published is only 1M. In my study, I need raw Img published by ros. what should I do , if I want to pulish raw img(5M).thank you!