public IHttpActionResult Post(PostedData postedData)
 {
     try
     {
         string resultMessage = null;
         if (OpenCvTrainer.Train(postedData.SubjectName, out resultMessage, postedData.Image1Data, postedData.Image2Data, postedData.Image3Data, postedData.Image4Data, postedData.Image5Data))
         {
             return(Json(new { Result = "Success", Message = resultMessage ?? "Unknown" }));
         }
         else
         {
             return(Json(new { Result = "Failure", Message = resultMessage ?? "Unknown" }));
         }
     }
     catch (Exception ex)
     {
         return(Json(new { Result = "Failure", Message = ex.Message }));
     }
 }
 public IHttpActionResult Post(PostedData postedData)
 {
     return(Json(opencv.OpenCvTrainer.Predict(postedData.Image1Data)));
 }