Patent ID: 11887362
Assignee: ARASHI VISION INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 3:
4. A sky filter method for panoramic images, comprising steps of:
obtaining several panoramic images containing sky regions as a data set, and marking a sky region and a ground region of each of the panoramic images in the data set, so as to obtain a marked mask image corresponding to each of the panoramic images in the data set, and obtaining a panoramic sky template image;
respectively extracting features of the sky region and the ground region of each of the panoramic images in the data set according to the marked mask images, and marking a positive sample and a negative sample of each of the panoramic images;
sequentially inputting the positive sample and the negative sample of each of the panoramic images in the data set to a support-vector machine (SVM) for training, so as to obtain a model;
extracting features of a test panoramic image, and inputting the features to the model, so as to obtain an initial mask image in which sky pixels and ground pixels are marked;
removing misclassified pixels and misclassified regions in the initial mask image, so as to obtain a corresponding accurate mask image; and
fusing the panoramic sky template image and the test panoramic image on the basis of the accurate mask image by using a multi-resolution fusion algorithm, and generating a fused image having a sky filter effect, by fusing the panoramic sky template image and the test panoramic image on the basis of the accurate mask image by using a multi-resolution fusion algorithm;
wherein the step of removing misclassified pixels and misclassified regions in the initial mask image, so as to obtain a corresponding accurate mask image, specifically comprises steps of:
performing median filtering on the initial mask image, based on the prior knowledge of the sky in the upper part of the image and the ground in the lower part of the image, filtering out misclassified single pixels; specifically:, setting the weight of the pixel (x, y) to p:, p
   =
   
    
     (
     
      1
      -
      
       y
       H
      
     
     )
    
    3
   
  
  ,
  
   y
   ∈
   
    (
    
     0
     ,
     
      H
      -
      1
     
    
    )
   
  
 

where H is the height of the image, W is the width of the image: x∈(0, W−1);
convoluting and thresholding the initial mask image by using the weight map to obtain an initial mask image with noise removed; and
removing the misclassified regions in the sky region and the ground region to obtain an accurate mask image.