srakaresults.blogg.se

How do i use the mask function in photo stamp remover
How do i use the mask function in photo stamp remover




how do i use the mask function in photo stamp remover
  1. #How do i use the mask function in photo stamp remover how to#
  2. #How do i use the mask function in photo stamp remover code#

  • Windows/Mac - The lines on the image represent individual cut lines. Click on the cut line you wish to hide on the image itself, or select the contour to be hidden from the menu at the right of the window.
  • Step 3 - The Hide Contour window will appear.
  • iOS/Android - Select Hide Contour under the Actions menu.
  • Windows/Mac - Click Contour in the Layers panel.
  • Step 2 - Select the layer for which you want to hide cut lines, and then:
  • iOS/ Android - Select the image and then select Ungroup in the Actions menu.
  • Windows/Mac - Select the image and then click Ungroup at the top of the Layers panel.
  • Step 1 - You will need to ungroup an image first if it has multiple layers. Follow the detailed steps below to use the Contour function. cv::namedWindow("Original_Image", cv::WINDOW_FREERATIO) Ĭv::namedWindow("Result", cv::WINDOW_FREERATIO) Ĭv::Mat originalImg = cv::imread("y25av.The Contour tool allows you to hide a portion of an image layer by removing any unwanted cut lines. Update: The implementation, this is the code, it is in C++, but you can consider the steps and it is all the same.

    how do i use the mask function in photo stamp remover

    And then when the image created before used it as the mask, you should first convert the image to gray, and then threshold the image with THRESH_BINARY flag. Some hints to create the mask: When you created the mask image by some tools (image editor), the background must be in black and the logo area must be in white. Indicate area to be dst destination algorithmType see xphoto::InpaintTypesĬV_EXPORTS_W void inpaint(const Mat &src, const Mat &mask, Mat &dst, const int algorithmType) Nonetheless you can try mask mask (CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels In case ofģ- and 4-channels images the function expect them in CIELab colorspace or similar one, where firstĬolor component shows intensity, while second and third shows colors. src source image, it could be of any type and any number of channels from 1 to 4. You can try inpaint() function of the OpenCV contrib_module, which you first need to create a mask and indicate the area where the logo is there on the image, then pass the image and the mask, and then the result will be stored in the destination image.

    #How do i use the mask function in photo stamp remover code#

    It will be great if you can provide some sample code as well along with concept.

    #How do i use the mask function in photo stamp remover how to#

    From here onwards I don't know how to proceed to remove watermark. import numpy as npĬv2.rectangle(img, (x1, y1), (x2, y2), (255,0,0), 2)Ībove code is able to find correct coordinates of watermark. I have only one image with watermark on it as below so not able to use inpaint() function as well.Ĭurrently trying below simple code to find out exact location of the watermark in the image (by cropping the water mark manually and finding the location in the original image). I was also thinking to try cv2.inpaint(img,mask,3,cv2.INPAINT_TELEA) but I don't have mask image. Similary I tried many other deep learning library with no luck. The crop_watermark() function in this library was not working for my image.It was cropping some other part of the image which is not water mark there was many other issue with code as well. I tried various code which uses tensorflow/deep learning below which din't generalise and given various error while running them.įor example I tried automatic-watermark-detection( ) but it din't work. Original image3:]Ĭropped watermark image from original image: ] I am able to find location of watermark by finding the location of cropped watermark image in the original image in the image which is constant for all the images.

    how do i use the mask function in photo stamp remover

    I am trying to remove watermark/logo from an image. I am very new to opencv and deep learning using python.






    How do i use the mask function in photo stamp remover