Tag:Pixel point

  • Opencv image corrosion and image expansion


    Image corrosion 1. Morphological transformation is mainly aimed at binary images2. Two input objectsObject 1: binary imageObject 2: convolution kernel3. The central point of convolution kernel scans the original image pixel by pixel4. For the pixel points in the scanned original image, the value is 1 only when the element values corresponding to the convolution […]

  • Threshold segmentation and threshold implementation


    Binary thresholding First, select a specific threshold value, such as 127The new threshold generation rule is:The gray value of pixels greater than or equal to 127 is set to the maximum value (for example, the maximum 8-bit gray value is 255)The gray value of pixels with gray value less than 127 is set to 0 […]

  • Solve the problem of fuzzy canvas drawing


    Canvas painting often finds that he is fuzzy. There are two main ways to solve this problem. Change the pixels rendered by canvas Situation: the line drawn with 1 pixel looks blurred, as if it is wider.Solution var ctx = canvas.getContext(‘2d’); ctx.translate(0.5, 0.5); Principle: we all know that the smallest unit of the screen is […]

  • [pytoch practice] use CNN image classification


    [pytoch practice] use CNN image classification demand In 4 * 4 pictures, compare the number of black pixels on the periphery and the number of black pixels on the inner circle to classify the pictures As shown in the figure above, 5 black pixels on the periphery of the picture are larger than 1 black […]