Skip to content
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

New commands and bug fixes #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Pinoerkel
Copy link

added some useful P2 Pro commands for

  • shutter close/open
  • shutter auto mode disable/enable
  • gain select (low/high)
  • triggering NUC calibration with closed shutter
  • triggering NUC calibration with open shutter for differential background monitoring
  • getting shutter state

color coding fix that applies when internal camera palettes are set

- added 2 commits December 22, 2023 00:58
- shutter close/open
- shutter auto mode disable/enable
- gain select
- triggering NUC calibration
- getting shutter state
@clientforgit
Copy link

Hi! I'm trying to get rid of one problem with p2pro using your code. The problem is that p2pro calibrates itself after a while (from 5 to 60 seconds) and I need to disable it. I tried disabling shutter auto mode but it didn't help. Can you please tell me where did you get the protocol documentation?

@Pinoerkel
Copy link
Author

I think I did not put that part in there on purpose, because it might be irreversibly dangerous when used incautiously. The auto shutter feature can be configured via many parameters, including time and temperature intervals which trigger the automatic shutter in certain cases. It also has a feature to automatically close the shutter on extensive overexposure which might damage the sensor otherwise (e.g. the sun or a welding spot). Turning off the automatic shutter will result in large temperature drifts over time. Your temperatures might be total bogus after a while. Nonetheless, I could extend the code accordingly, if you wish so.

@clientforgit
Copy link

clientforgit commented Aug 4, 2024

Thank you for your response! If turning off the automatic shutter will result temperature drifts can you at least add configuration to time and temperature intervals? (if turning off is not working I want to increase the time interval). But I would be glad if you would add all possible configurations related to the shutter with mentioning or restricting safety boundaries.
Also, can we talk about this privately? My telegram: https://t.me/MS_Faust

@Pinoerkel
Copy link
Author

Since the owner of this repository is obviously not interested in my pull request, I checked in some modifications for full shutter control in my fork of this repository. Feel free to grab them from there. https://github.com/Pinoerkel/P2Pro-Viewer
The parameters have some information and min/max values in the comments. There is a function for getting and printing all parameters and I put another function with an example for setting parameters and a warning notice. Use it at your own risk. Sorry, I do not use Telegram.

@clientforgit
Copy link

Thank you very much for your update, it works!

@clientforgit
Copy link

Hi! I have a few more questions about the capabilities of protocol:

  1. Can we change the thermal diapason of a camera?
  2. Can we change the white balance, and contrast brightness?
  3. Can we get raw data from the thermal matrix?

@Pinoerkel
Copy link
Author

  1. I do not know what you mean by that. But if it is the gain settings: the P2 pro has low and high. With one covering lower temperatures at better noise levels and the other one covering higher temperatures.
  2. You can get 14bit raw values which are stored in the lower half of the output image. See video.py, thermal_data
  3. A monochrome image has no white balance neither does a color gradient mapped version of one in the traditional way. You can however take the raw values and do your own image processing on it e.g. using OpenCV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants