API Reference

This page describes how the frontend should communicate with the API in the case of blurry images

In order to prevent blurry images being sent to extraction, and in order to give a chance to the camera to sharpen its focus we've implemented this anti-blurring procedure.

The basic procedure is as follows:

blur_value = none
do while info_code not in (1000, 1007):
	request_data = collect_data()
	if blur_value is not none:
    request_data["BlurValues"].add_to_list(blur_value)
 	else:
  	request_data["BlurValues"] = []
	response = validation(request_data)
	if response contains "DetectedBlurValue":
		blur_value = response["DetectedBlurValue"]
	else:
  	blur_value = none

Where the frontend needs to supply all tracked blur values to the service if it received the blur value from the service. If it hasn't, the frontend needs to empty all tracked blur values and start from scratch. This way, the service tracks if the camera is sharpening itself. This procedure is not obligatory, but it is recommended. If you do not use this procedure, the service will return info code 1001 in the case the image is too blurry.