Temperature Detector API

Temperature Detector API - Thermoquaesitor (also known as human temperature detection on thermal image API) is a cross browsers REST API which get a JSON input with a still photo (as base64 encoded string) or an url of the image together with the scale of temperatures (units may be Celsius, Kelvin or Fahrenheit) and returns a JSON string which contains predictions with certain amount of probability (filtered for output with minimum 50%), bounding boxes of maximum detected temperatures in the eyes zone of the human face with its top, left, width, height values. Also it outputs a base64 encoded string photo which is the original input photo with drawned bounding boxes upon it and also with the maximum temperature values detected according to input temperature scale photo. For one still photo the API may return multiple predictions with different probability scores of detected temperatures of human faces. Our pricing packages count the predictions, so for one request, multiple predictions may be counted. We filter the results of predictions so we display only the predictions with a probability score higher than 50%. Of course, there are some limitations in order to get a higher accuracy. We recommend properly exposed, unobstructed JPEG photos at 1920x1080 (full HD resolution) where ratio between height of bounding box and height of entire picture should be at least 1:15. For ratios like 1:16, 1:17, 1:18 and so on the accuracy is lower and the AI algorithm may not see the human face and the prediction score will be low. We do not store pictures. Also, the quality and the angles of the camera are very important and it contribute to a higher detecting accuracy. It should have varifocal lenses, high shutter speed, good infrared lighting beam.

Allthough this Temperature Detector API (currently we do not offer a temperature detection sdk) is intended for software development and therefore developers, we have also here an temperature detector on human face thermal image online application that may be used to check the input and output JSONs of the API.

The necessary steps are written below, basically for this real time temperature detector or detection API you send an authorized POST request in JSON format to the API endpoint and you get as JSON response the output as described below through parameters and examples.

This Temperature Detection API is useful for a large number of domains like: checking private entrances in restaurants, malls, close spaces, airports, bus stations, railway stations etc.You own the commercial copyright of the resulted JSON with no additional fee meaning you may use it in your own apps for sale. For using our temperature detector API and/or APP you must create an account (free of charge, no card required), activate it from your received email, login and then start your TRIAL package with no fees as you can see at our pricing packages. After you have tested the API and/or APP and you are satisfied, you may buy a paid package. You will always see at your Admin Console page the real resources consumption in real time, your invoices, you may see/edit/delete your profile or export log consents as GDPR instructed, you may read our FAQs.

Temperature Detector APP

Photo File
Image URL(*)
* Let the "NO" value of Image URL if you upload a Photo File, otherwise write the image url like http://domainname.com/image.jpg
Temperature Scale Photo File
Temperature Units

 



API Endpoint (method POST):
https://gatiosoft.ro/thermoquaesitor.aspx
Headers:
Authorization: Basic //Your username:password are base64 encoded string
Content-Type: application/json
Accept: application/json
JSON Request Body (change inputs here and see in real time below):
                   {
  "base64_Photo_String": "iVBORw0KGgoAAAA...base64 encoded string photo...GAAAAAElFTkSuQmCC",
  "photo_url": "NO",
  "scale_photo": "iVBffdasergoABAA...base64 encoded string photo...TyRRAAElFTkSC",
  "temp_units": "F",
  "max_scale_temp": "99.8",
  "min_scale_temp": "76.4"
}
               
JSON Response From API (change inputs here and see in real time below):
{
  "created": "2020-05-02T12:28:09.989Z",
  "predictions": [
    {
      "probability": 0.9913594,
      "tagId": "6b333d95-e461-4155-890c-9921158f7d17",
      "tagName": "sinus",
      "boundingBox": {
        "left": 0.590857267,
        "top": 0.049960345,
        "width": 0.153553188,
        "height": 0.287757039
      },
      "max_temperature": "95.5"
    },
    {
      "probability": 0.9909611,
      "tagId": "6b333d95-e461-4155-890c-9921158f7d17",
      "tagName": "sinus",
      "boundingBox": {
        "left": 0.241624564,
        "top": 0.2652982,
        "width": 0.137271315,
        "height": 0.2830975
      },
      "max_temperature": "93"
    }
  ],
  "final_photo": "iRRfdewqRA..final base64 encoded string photo with drawn bounding boxes...SwervasCC"
}
JSON Response (Example) From API in case of ERROR:

 [
  {
    "cd": "1001",
    "description": "The authorization header Is either empty Or isn't Basic"
  }
]

Request Parameters Table

Parameter Name
Parameter Description
base64_Photo_String
This is the thermal infrared input photo as base64 encoded string [string] which will be scaned for maximum temperature according to scale_photo parameter. If you set this parameter, the below photo_url parameter value must be set to NO. For this example below, the photo source is: https://spaceplace.nasa.gov/comet-ocean/en/

thermal image for input

photo_url
This is the image url [string] of the thermal infrared input photo used for detecting maximum temperature according to scale_photo parameter. Its default value is NO because the above parameter base64_Photo_String is set. If this parameter is set to an image url, base64_Photo_String value must be NO.
scale_photo
This is the pallete color used for detecting maximum temperature on the thermal infrared input photo, as base64 encoded string image [string] which has usually whiter colors for higher temperatures and darker colors for lower temperatures. Each thermal camera may has different pallete color scales, so it is very important to input the right pallete color for the input photo in vertical position as shown here with the highest temperature on the top of it. Pay attention when crop this pallete color scale from the source image, do not enclose contours or any text!
thermal image scale
temp_units
This parameter [string] is used with C or F or K values corresponding to Celsius, Fahrenheit or Kelvin units. The parameters max_scale_temp and min_scale_temp presented below must have the values with these units of measure.
max_scale_temp
This parameter [string] is used for the highest temperature on the scale above (on top of it) with the units of measure set with above parameter. Example for Celsius units: 39.
min_scale_temp
This parameter [string] is used for the lowest temperature on the scale above (on top of it) with the units of measure set with above parameter. Example for Celsius units: 30.

Response Parameter Table

Parameter Name
Parameter Description
created  
This is the timestamp as  [string] at the moment that request is made.
final_photo 
This is the final photo base64 encoded string [string] upon which bounding boxes are drawn including maximum temperature detected. For this example below, the initial input photo source is: https://spaceplace.nasa.gov/comet-ocean/en/

thermal image with maximum temperature detected

predictions
This is a list or array which contains the parameters explained below.
probability
This is the probability score [real] of the detected human face.
tagId
This is the tagId [string] for the detected human face. Example: 6b333d95-e461-4155-890c-9921158f7d17.
tagName
This is the tagName [string] for the detected human face. Example: sinus.
max_temperature
This is the maximum temperature detected between the eyes area of the human on the detected face upon input thermal infrared image [string] with units of measure set at input JSON. Example: 38.7.
boundingBox
This is an object that contains the below explained parameters.
left
This is the upper left coordinate [real] of the rectangular bounding box surrounding the detected human face.
top
This is the upper top coordinate [real] of the rectangular bounding box surrounding the detected human face.
width
This is the width [real] of the rectangular bounding box surrounding the detected human face.
height
This is the height [real] of the rectangular bounding box surrounding the detected human face.

Response Error Codes Table

Parameter Name
Parameter Description
cd

This is the error code which may be:

  • 1001
  • 1002
  • 1003
  • 1004
  • 1005
  • 1006
  • 1007
  • 1008
  • 1009
  • 1010
  • 1011
  • 1012
  • 1013
  • 1014
  • 1015
  • 1016
  • 2001
description

This is the description of the error code which may be:

  • 1001 - The authorization header is either empty or isn't Basic.
  • 1002 - Daily requests number exceeded in TRIAL mode!
  • 1003 - Trial expired!
  • 1004 - Predictions number exceeded!
  • 1005 - Package expired!
  • 1006 - No invoice!
  • 1007 - Reader is NULL for TRIAL!
  • 1008 - Cannot Read if TRIAL exists!
  • 1009 - Error connecting to database looking for TRIAL! (and a detailed description message of the encountered error)
  • 1010 - Reader is NULL for Invoice!
  • 1011 - Cannot Read if Invoice exists!
  • 1012 - Error connecting to database! (and a detailed description message of the encountered error)
  • 1013 - Input request too long! Maximum 5 MB per request are allowed / Nothing to upload
  • 1014 - Invalid request data! (and a detailed description message of the encountered error)
  • 2001 - Invalid request data after passing to the API (and a detailed description message of the encountered error)

Source Code Examples for Using Our Temperature Detector API

                       
Imports System
Imports System.Text
imports System.Collections.Generic
Imports System.Net
Imports Newtonsoft.Json

Public Class temperature_detector_api
    Public Class ResponseFields
	 Public Property created As String
         Public Property predictions As New List(Of prediction)
         Public Property final_photo As String
    End Class

    Public Class prediction
	 Public Property probability As Single
         Public Property tagId As String
         Public Property tagName As String
         Public Property boundingBox As New boundingbox
         Public Property max_temperature As String
    End Class

    Public Class boundingbox
	 Public Property left As Single
         Public Property top As Single
         Public Property width As Single
         Public Property height As Single
    End Class
    
    Public Class ErrorFields
        Public Property cd As String
        Public Property description As String
    End Class

    Protected Sub SendRequest()
        Dim Client As WebClient = New WebClient()
        Dim credentials As String = Convert.ToBase64String(Encoding.ASCII.GetBytes("your_username:your_password"))
        Client.Headers(HttpRequestHeader.Authorization) = String.Format("Basic {0}", credentials)
        Client.Headers(HttpRequestHeader.Accept) = "application/json"
        Client.Headers(HttpRequestHeader.ContentType) = "application/json"
	Client.BaseAddress = "https://gatiosoft.ro/thermoquaesitor.aspx"
        Dim resString As String = ""

        Try
            Dim js As String = "Replace this string with your JSON Request Body string like in the example above on the website"
            Dim reqString As Byte() = Encoding.UTF8.GetBytes(js)
            Dim url As Uri = New Uri(Client.BaseAddress)
            Dim resByte As Byte() = Client.UploadData(url, "post", reqString)
            resString = Encoding.UTF8.GetString(resByte)

	    If resString.IndexOf("predictions") > 0 Then
                Dim r As ResponseFields = New ResponseFields()
                r = JsonConvert.DeserializeObject(Of ResponseFields)(resString)
                Console.Write(resString)
            Else
		Dim e As list(of ErrorFields) = New list(of ErrorFields)
		e = JsonConvert.DeserializeObject(Of list(of ErrorFields))(resString)
                Console.Write(e(0).cd)
                Console.Write(e(0).description)
            End If

            Client.Dispose()
        Catch exception As Exception
            Dim ex As System.Exception = exception
            Console.Write("ERROR: " & resString & ex.Message)
        End Try
    End Sub

    Public Shared Sub Main()
	Dim b As temperature_detector_api = New  temperature_detector_api
        b.SendRequest()
    End Sub
End Class



Thermoquaesitor Online Video Presentation

Temperature Detection API, Thermoquaesitor is in the video presentation below. There are several search terms which you may use like: temperature detector api, face detection on infrared image api, temperature detection api, thermal face detection api, infrared face detection api.

 



Pricing Packages

Please choose one of the below pricing packages for start using our Temperature Detector API and online APP!

Start TRIAL
No catches

  • 7 days TRIAL.
  • Use our cloud REST API and online APP.
  • Maximum 50 requests per DAY in trial period.
  • You do NOT own the commercial copyright for using the API in your apps in trial period.
  • Get bounding boxes for each human face detected with maximum temperature.
  • Get the probability score of each detected human face in the input photo.
  • Get timestamp at the moment of the request
  • Administration console
  • Support through online chat and/or tickets
  • We do NOT allow spam accounts for TRIAL



Monthly TIER
Popular

  • 80 USD per month
  • Use our cloud REST API and online APP
  • Maximum 10000 predictions(*) per month
  • Maximum 50 requests per MINUTE
  • You own the commercial copyright to use it in your apps.
  • Get bounding boxes for each human face detected with maximum temperature.
  • Get the probability score of each detected human face in the input photo.
  • Get timestamp at the moment of the request
  • Administration console
  • Premium support through online chat and/or tickets, very supportive help and quick responses.



Yearly TIER
(15% Discount)

  • 816 USD per year
  • Use our cloud REST API and online APP
  • Maximum 10000 predictions(*) per month
  • Maximum 50 requests per MINUTE
  • You own the commercial copyright to use it in your apps.
  • Get bounding boxes for each human face detected with maximum temperature.
  • Get the probability score of each detected human face in the input photo.
  • Get timestamp at the moment of the request
  • Administration console
  • Premium support through online chat and/or tickets, very supportive help and quick responses.



Note: VAT rate may be added or not, function to your country and/or if you are a taxable person or company.
* Prediction - on the input photo may exist many predictions, each of it with certain amount of probability of detected human face on thermal image. Even we filter the output predictions to those with probability score greater than 50%, for the input photo all predictions are counted.