HF-NET (2) Global feature positioning and local feature matching based on HF-Net

2023-01-12   ES  

Original blog, please indicate the source for reprinting
http://blog.csdn.net/hello_hwc?viewmode=contents
Welcome to follow my iOS SDK detailed interpretation column
http://blog.csdn.net/column/details/huangwenchen-ios-sdk.html


Foreword: UITABBARController and UinaVIGATIONTROLler are navigation mode for most apps. The UITABBAR of UITABBARController is the UI part of its presentation to users, so it is important to understand its attributes and how to customize it. This article imitatesSina WeiboWrite a simple tabbar. Interested students can download it to see. I will briefly mention the realization of DEMO in the end of this article.


demo effect (icon text is written casually)
static map

The specific code of

Demo will not be explained. If you are interested, you will know what’s going on after downloading it. Moreover, my resources can be lowered without points.
download link
http://download.csdn.net/detail/hello_hwc/9068705


UITABBAR commonly used attributes

tintColor// Define the color selection color of tabbaritems

For example, set to red


How related attributes related to Image

backgroundImage

Set the background picture of UITABBAR, for example, set the background picture of the initial DEMO at the beginning of the above

shadowImage // Shadow Picture
selectionIndicatorImage // Tabbar after Select Planting, then pictures below Baritem.

translucent // Whether transparent

Uibaritem several common properties

image/selectedImage // Picture, and the selected picture

For example, in my demo, the Item in the middle sets the following settings
Guaranteed how to click and use the pictures I want

 item.image = [midImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
 item.selectedImage = [midImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

adjustment of the position of Title and icon

titlePositionAdjustment/imageInsets

For example, in my demo, there is a big picture in the middle. If there is no title, you need to adjust the position of the icon

item.imageInsets = UIEdgeInsetsMake(5.0, 0, -5.0, 0);

Before adjustment
这里写图片描述

这里写图片描述


Set font style

setTitleTextAttributes:forState:

For example, use the following code to set the font to blue

 [item setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blueColor]} forState:UIControlStateNormal];

Comparison before and after setting
这里写图片描述这里写图片描述


demo explanation

  • 糊 糊 糊 Using UIVISUALEFFECTVIEW
  • Animation I tried Keyframe, UISNAPBEHAVIOUR, and the code in Demo, and found that it was a clearer in demo.
  • Use tag to pass the number of icons to be clicked

source

Related Posts

H5 Implementation picture upload case

Thymeleaf calls onClick passing the js function (multi -parameter) writing

2588: spoj 10628. Count on a Tree [Specific Line Tree+Double LCA]

vs2015 64 -bit system under Mapwingis.ocx configuration

HF-NET (2) Global feature positioning and local feature matching based on HF-Net

Random Posts

webView and JS interact all methods and use

[SpringCloud] Fenchley & Greenwich skeleton construction (1)

X-axis length, that is, gray level axis_params = [] axis_params.append (0) axis_params.append (x_size) #plt.figure () if name! = None: PLT.TITLE (name) PLT.BAR (Tuple (Keys), Tuple (Values))#Draw a histogram #PLT.SHOW () #Map the ash array as a histogram dictionary, nums represents the magnitude of the grayness DEF ArrayTohist (Grayarray, Nums): if (len (grayarray.shape)! = 2): Print (“length error”) Return None w, h = Grayarray.shape Hist = {} For K in Range (NUMS): Hist [k] = 0 for I in Range (W): for j in range (h): if (hest.get (grayarray [i] [j]): is none): history [grayarray [i] [j]] = 0 Hist [grayarray [i] [j]] += 1 #normalize n = w*h for key in history.keys (): Hist [key] = float (history [key])/n Return Hist #Accut the cumulative histogram calculating new balanced pictures, nums is grayscale, 256 DEF Equalization (Grayarray, H_S, Nums): #Calculation accumulated histogram TMP = 0.0 h_acc = h_s.copy () for I in Range (256): TMP += H_S [i] h_acc [i] = tmp if (len (grayarray.shape)! = 2): Print (“length error”) Return None w, h = Grayarray.shape des = np.zeros ((w, h), dtype = np.uint8) for I in Range (W): for j in range (h): des [i] [j] = int ((nums – 1)* h_acc [grayarray [i] [j]] +0.5) Return des DEF HISTMATCH (Grayarray, H_D): #Calculation accumulated histogram TMP = 0.0 h_acc = h_d.copy () for I in Range (256): TMP += H_D [i] h_acc [i] = tmp h1 = Arraytohist (Grayarray, 256) TMP = 0.0 h1_acc = h1.copy () for I in Range (256): TMP += H1 [i] h1_acc [i] = tmp #Calculation mapping M = np.zeros (256) for I in Range (256): IDX = 0 minv = 1 for j in h_acc: if (np.fabs (h_acc [j] -h1_acc [i])

LINUX offline installation TensorFlow-GPU-2.0.0

In the Vue project, realize the function of closing the browser before the browser, FELIX