Files
2023-10-24 13:02:07 +02:00

23 lines
868 B
Python

import json
from logging import getLogger
from cam_server.pipeline.data_processing import functions
_logger = getLogger(__name__)
def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata=None):
# Add return values
return_value = dict()
prefix = parameters["camera_name"]+":"
#(min_value, max_value) = functions.get_min_max(image)
(x_profile, y_profile) = functions.get_x_y_profile(image)
# Could be also y_profile.sum() -> it should give the same result.
# Add return values
intensity = x_profile.sum()
#return_value[prefix+"min_value"] = min_value
#return_value[prefix+"max_value"] = max_value
return_value[prefix+"x_profile"] = x_profile
return_value[prefix+"y_profile"] = y_profile
return_value[prefix+"intensity"] = intensity
return_value[prefix+"step"] = 0
return return_value