code: function detectObject({ imageName, sensitivity, tolerance }) {
  
      if (!imageName || !sensitivity || !tolerance) {
          alert("Must mention imageName, sensitivity and tolerance in passed configuration.");
          throw new Error("Must mention imageName, sensitivity and tolerance in passed configuration.");
      }
      
      if (sensitivity < 1 || sensitivity > 100 || tolerance < 1 || tolerance > 100) {
          alert("Sensitivity and Tolerance ranges between 1 and 100");
          throw new Error("Sensitivity and Tolerance ranges between 1 and 100");
      }
      
      var white = {
          r: 255,
          g: 255,
          b: 255
      };
  
      var base64Img = createRGBPixels(imageName)
          .then(function(img) {
      
              var detectedObject = img.detectObject(sensitivity, tolerance, white);
              
              return detectedObject;
      
          })
          .then(function(detectedObject) {
      
              var base64ImgResponse = detectedObject.save();
              
              return base64ImgResponse;
      
          });
  
      return base64Img;
  }
docs: === API ===