Python calibration tool, make this short script even shorter :)

This script’s purpose is to check whatever the acceleration component s in order.
The IMU data sampled represent 2 samples of the imu measurements.

I’d love to hear your comments regarding readability and best practices.

import logging
import math
import sys

IMU_data_samples = (((-1.4120378002684528, -10.210593634959793, 3.3613594121682193),
                     (-0.002742788783767945, -0.0011996491815411065, 0.0032035080745434893)), (
                        (-1.408874821800522, -9.216022765908352, 3.3767004976616977),
                        (0.003897155186363737, -0.007772396210449728, 0.008185690588342136)))

G_FORCE = 9.81

def make_logger():
    log = logging.getLogger(__name__)
    formatter = logging.Formatter('%(filename)s - %(asctime)s - %(levelname)s - %(message)s')
    handler = logging.StreamHandler(sys.stdout)
    return log

logger = make_logger()

def check_IMU_values() -> str:
    for accelerometer, gyro in IMU_data_samples:
        for g in gyro:
            if g == 0 or abs(g) > GYRO_TOLERANCE:
                logger.exception('one of the Gyro axes is equal zero or unreasonable gyro value ')
                raise Exception

        acc_axis_values_list = ()
        for acc_axis_value in accelerometer:
            acc_axis_values_list.append(acc_axis_value * acc_axis_value)
            if acc_axis_value == 0:
                logger.exception('one or more the acc axes is equal 0 !!!  ')

        acc_root_of_sum_of_squares = (math.sqrt(sum(acc_axis_values_list)))
        if not G_FORCE - ACC_TOLERANCE < acc_root_of_sum_of_squares < G_FORCE + ACC_TOLERANCE:
            logger.exception('acc value is out of scope ! ')
            raise Exception
    return 'The IMU is in order.'

if __name__ == '__main__':

calibration – Battery indicators differing when phone is on and off

When it is on, it charges until a certain percentage (around 50 or 60) and gets stuck. Then, I power off to charge and the indicator appears as 100%. Why is that? I know my phone (Freetel FTJ162D, Android 6) needs calibration, but wanted to know why there is this difference in the indicator when on and off.

sensor – How are focal lengths derived from camera calibration (resectioning) and pixel sensitive area related?

In camera calibration (camera resectioning process, e.g. camera calibration with OpenCV) does the result for focal lengths fx and fy depend on the photo-sensitive area inside the pixel ?

If I have a camera sensor (CCD/CMOS) with a perfect square grid arrangement of pixel elements, but each pixel element has rectangular pixel sensitive area (photodiode).
For example, pixel dimensions are a x a, but photosensitive area dimensions are 0.5*a x a.
Would result of camera calibration still be fx = fy ?

And what if the pixel sensitive area has some arbitrary shape due to additional electronics in CMOS ?

app calibration for old app

my moorola one vision that runs android 10 has trouble running a android 3 app. it runs fine, but when i touch somewhere on my screen, it will click 2mc above my finger. the game is 90 different logic games by w.water gamer. this app is no longer on the app store, you will have to search for an apk. this game really beats any other logic game apps and i would do anything for it to work.this app needs at least android 3.0 to run properly. it is old, too. it doesn’t work right on my phone but on my old tablet it worked just fine. maybe it’s the screen size? the size is 2520×1080. please help quickly, i can’t wait to play it again.

color management – How to use my display calibration settings with photoshop

You should never use a monitor profile as your “working space” color profile. They’re two different types of profile that should be applied at two different steps in the processing pipeline between the image file and your monitor.

If you apply a monitor profile as your “working space” color profile and then it is applied again when sent to your monitor, you’re applying the same “correction” twice and whatever you “corrected” will no longer be correct.

color management – How to create custom reference data for ColorChecker Charts using X-Rite ColorChecker Camera Calibration?

I am using ColorChecker Camera Calibration v2.0 in combination with Colorchecker Digital SG achieving the most colourimetric accurate colours. At the moment the software is using the values given by the ColorChecker manufacturer (X-Rite). But I have profiled all the patches of the target using a colourimeter and I would like to use those values instead. I can’t find a way to do that searching on the internet. Is there any way I can access and modify the reference values of the targets?

If you are not used to scientific photography please read the description of why I need this at the following link (archived copy). My question is simply: how can I do that with ColorChecker Camera Calibration software instead of i1Profiler as I do now.

How to use custom color values with X-Rite ColorChecker Camera Calibration?

I am using ColorChecker Camera Calibration v2.0 in combination with Colorchecker Digital SG for calibrating my images, for getting the most accurate colors. At the moment the software is using the values given by the ColorChecker manufacturer (X-Rite). But I have profiled all the patches of the target using a colourimeter and I would like to use those values instead. I can’t find a way to do that searching on the internet. Is there any way I can access and modify the reference values of the targets?

c++ – Need helps for eye tracking calibration using std::thread and std::condition_variable

I am a newbie in std::thread and std::condition_variable.

I would like to use 2 threads: one for display (void showCalibration()) and the other for processing (void CaptureFrame()). These threads access a global variable (temp_pupil).

The display thread will clear the variable after a specific time to get the data (pupil) from processing thread (during that time):

#include <opencv2/core/core.hpp>
#include <iostream>
#include <thread>
#include <mutex>
std::vector<cv::Point2d> temp_pupil;
std::mutex mu;
std::condition_variable cond;

void showCalibration()
    for (int i = 0; i <= 9; i++)//plot 9 points sequentially
        std::unique_lock<std::mutex> lk(mu);
            temp_pupil.clear();//prepare for get new data
        cond.notify_one();//signal CaptureFrame() to capture data
        std::this_thread::sleep_for(std::chrono::milliseconds(100));//specific time

            while (temp_pupil.empty())
                cond.wait(lk);//wait CaptureFrame() to end current point
            std::string cal = std::to_string(temp_pupil.size()) + "Cali" + std::to_string(i) + "n";
            std::cout << cal;//print

void CaptureFrame()
    cv::Point2d pupil;
    for (int i = 0; i <= 500; i++)
        std::unique_lock<std::mutex> lk(mu);
            pupil = cv::Point2d(i, i);//create data
            temp_pupil.push_back(pupil);//get data
            std::string cap = std::to_string(temp_pupil.size()) + "Captue" + std::to_string(i) + "n";
            std::cout << cap;//print
        cond.notify_one();//signal showCalibration() to end current point

int main()
    std::thread cal_thread(showCalibration);//display thread
    std::thread cap_thread(CaptureFrame);//process thread

Could anyone help me review above code ?

color management – ICC Calibration (Profile) for more bright black on LED screen

I have an IPS LED screen and I don’t like its black because it is very dark. I know it’s a bit strange (is it?) but I want the black to be more bright (that means grey) without white becoming darker. A dark blue would naturally become more bright then too and so on.

The contrast setting in the LED screen is already adjusted very low, so I think an ICC Profile would be good to make it better. It shall be an ICC Profile which is active the whole time in Windows which is strictly speaking called calibration file (ICM).

I can describe my desired transformation with 4 numbers and a principle but won’t insist on it exactly:

  • 0 (black) to grey (0.3)
  • 1 (white) to 1 (white)
  • linear interpolation in between

so I think there should be a simple icc file or software to create it for my purpose? I have already digged in some icc files and saw some complicated color spaces which would be overwhelming to dig into for my purpose.

Battery Saver – Battery Calibration and Recovery

Battery Saver is designed to help you improve battery life on Android mobile devices. It will keep track of your battery information in real-time, enabling you to kill unwanted background running processes and identify the apps causing CPU to overheat. This batter saver tool also doubles up as a fast cleaner app, freeing up a ton of your phone’s RAM and memory. What’s more, it acts as a power saver.

Battery Saver App features

The fast cleaner and battery saver app is loaded with a bevy of exciting features, which include:
● Phone booster
● CPU cooler
● Junk cleaner
● Power saving modes
● Accurate prediction of battery life

Phone booster

With the phone booster feature, you automatically monitor all the applications that run on your device, including those in the background. You will receive notifications on the apps that consume the most energy. Well, you can choose to shut down the unnecessary apps and only keep your favorite ones running. This can save you a significant amount of battery power so you wouldn’t have to constantly worry about low battery levels. You will surely spend less time with the charger plugged to your phone.

Junk cleaner

The app is designed with a powerful junk cleaner for Android that can greatly help with optimizing your device. Your phone will slow down when it runs out of available memory. If that happens, it makes your battery to drain more quickly. This feature allows you to clear cache data, residual files, temporary files, and system junk, which can eat a lot of your memory space. Please note that the junk cleaner does not delete documents, videos, photos, music, or files stored on your phone.

CPU cooler

In the Battery Saver app, you’ll find the CPU cooler that scans your smartphone and identifies the apps causing excess heat. It disables such apps to reduce the temperature of your device to a safe level with a single tap. Achieving optimum temperature is one way of squeezing more battery life from your device, as well as protecting your CPU and other hardware components from potential damage.

Power saving modes

The app comes with power-saving modes for maximum optimization. You can easily save battery by switching to ultra-fast and extreme power saver modes. For example, applying the power saving mode enables you to control the brightness of your phone, shut down battery consuming apps, decrease device performance, and use the black and white scheme to avoid battery draining.

Accurate prediction of battery life

Since this fast cleaner master and battery saver constantly keeps track of every app’s power consumption, it can give you more accurate predictions on battery charge levels. It can show you the extent to which you can extend the battery life in terms of hours or minutes.

Download the Battery Saver App now! You can’t go wrong with this battery monitor for your Android device. It will instantly fix the power consumption issues and extend battery life. Also, this app can be great for battery calibration, ensuring your battery charge level is absolutely accurate.

Download via Playstore:….battery.saver