New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem accessing the pyrealsense2 on python with windows 10 and contrast setting with python #2021
Comments
[Realsense Customer Engineering Team Comment] for detail you can refer to below link The precompiled binaries shipped with the installer assume python2.7. The error
and please check if the microsoft 2015 (or 2017) vc++ redistributable (x64) is also installed you can use python example code to ensure your tools chain is correct ex : C:\xxxx\librealsense\wrappers\python\examples\python-tutorial-1-depth.py |
Thank you for your quick response !!! Your answer helps me a lot, indeed my problem was a problem of an architecture mismatch. By installing everything from the architecture X86, the programs given in exemple in the wrapper/python directory works fine with python 2.7. However, when I am using the camera D435 and that I get lots of light the depth precision decrease too much. I think the problems come from the exposure that doesn't adapt to the environment. I see some examples for C++: However, I find nothing for python. Because It's possible to set the depth unit in python using: I was wondering if it is possible to do the same for the exposure option, knowing that a Json file give the following options to be set: Any other ways to improve the depth precision (At present I do some face detection for up to 5 meters)? PS_1: If this can help you when I run the code from the file python-rs400-advanced-mode-example.py given in the wrapper/python/example directory and I get the following features for the exposure: PS_2: Is the internal processing hardware of the camera (D4 ASIC) exclusively devoted to provide the best images and depth precision? Is there any ways to do some processing in the camera as an embedded system or all the high-level processing must be performed inevitably on the host computer ? PS_3: I don't see any post processing code in python for the camera like in C++. Is there any way to implement an existing one, or should I try to create it from scratch? I am aware that I have many questions and some are quite far from the original subject if you prefer I can create a post for each of them. I hope that you can help me again. Thank you in advance !! |
[Realsense Customer Engineering Team Comment] but as to your first question, yes , the default AE setting is ON, Options for RGB Camera |
Thank you for your response I will open another ticket for my other questions. It's good to know that the default AE setting is ON. Perhaps that I don't understand your answer, but I didn't find any rs-enumerate-devices.exe include in the SDK sample, what comes closest to it is: rs-enumerate-devices.cpp. However, I don't want to have a console application providing information about connecting devices. I just want to have the command in Python 2.7 for setting on or off the AE as well as the command in python to change manually the contrast to be able to implement it at the beginning of a program, if the AE is not suitable for the environment. Does this exist? |
[Realsense Customer Engineering Team Comment] Hi @pierref33, as to how to turn on /off AE using python script all options are listed in rs_options.h example code quote from #1258 pipeline_profile = pipeline.start(config) |
Ok I think that I understand the mechanism to go from C++ to python, thank you for taking the time to guide me! |
Hello,
I work with the camera RealSense D435 on windows 10. After having downloaded the SDK (librarylibrealsense-2.12.0) and test the "Intel RealSense Viewer" (that works fine !! ), I was hoping to access to the depth value for a frame of the camera with a python code. I have installed Python 3.6 and VisualStudio 2017. I then test the code given in github (for instance: access_depth_data.py). However, when I run the code, the 'import pyrealsense2 as rs' line return the following error : ImportError: DLL load failed: The specified module could not be found.
I searched on forum for similar problems and installed the pyrealsense2(2.9.1) package via visual studio, I also try to launch the program via the powershell (with python 3.6.1 version), I add to the same directory the pyrealsense2.py and realsense2.dll files. However the errors persist.
I try to use python 2.7 but I was getting the error : importERROR; importerror: module use of python27.dll conflicts with this version of python. and was enable to solve this.
I try to follow the stepsto install the python wrapper on the windows readme.md.
But at the second step: When running cmake-gui, select the BUILD_PYTHON_BINDINGS option
I was unable to generate it with Cmake and get the following error:
Any thought to help me resolve this problem will be more that welcome.
Thank you in advance !!
The text was updated successfully, but these errors were encountered: