Samples an image for a square matrix of bits of the given dimension. This is used to extract the /// black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode may be /// rotated or perspective-distorted, the caller supplies four points in the source image that define /// known points in the barcode, so that the image may be sampled appropriately.
/// * ///The last eight "from" parameters are four X/Y coordinate pairs of locations of points in /// the image that define some significant points in the image to be sample. For example, /// these may be the location of finder pattern in a QR Code.
/// * ///The first eight "to" parameters are four X/Y coordinate pairs measured in the destination /// {@link BitMatrix}, from the top left, where the known points in the image given by the "from" parameters /// map to.
/// * ///These 16 parameters define the transformation needed to sample the image.
/// * ///Checks a set of points that have been transformed to sample points on an image against /// the image's dimensions to see if the point are even within the image.
/// * ///This method will actually "nudge" the endpoints back onto the image if they are found to be barely /// (less than 1 pixel) off the image. This accounts for imperfect detection of finder patterns in an image /// where the QR Code runs all the way to the image border.
/// * ///For efficiency, the method will check points from either end of the line until one is found /// to be within the image. Because the set of points are assumed to be linear, this is valid.
/// * ///