반응형

Google Cloud Platform(GCP) 의 무료 프로그램을 이용하면 간단한 리눅스 서버를 만들 수 있다.

 

2019.10.11 - [Linux] - Google Cloud Platform Always Free Linux Web Server 구글 클라우드 플랫폼으로 무료 리눅스 웹서버 만들기

 

위 링크의 예전 방법과 비슷하지만 무료 프로그램 조건이 약간 변경 되었다.

 

GCP - Compute Engine - VM instances를 클릭한다.

 

CREATE INSTANCE를 클릭한다.

 

우선 무료 Compute Engine의 조건을 확인해 보자.

Google Cloud 무료 프로그램

 

 

무료 프로그램 조건에 맞게 설정하고 Create 버튼을 클릭한다.

  • Name: 원하는 이름으로 지정한다.
  • Region: 아래 목록중 하나를 선택한다.
    - Oregon: us-west1
    - Iowa: us-central1
    - South Carolina: us-east1
  • Machine family: General-purpose
  • Series: E2
  • Machine type: e2-micro (2 vCPU, 1 GB memory)
  • Boot disk: standard persistent disk로 최대 30GB 까지 선택 가능.
  • Firewall: 웹서버를 설치한다면 Allow HTTP/HTTPS traffic을 선택한다.

 

Instance가 생성 되었다. Connect - SSH 를 클릭한다.

 

생성된 Instance에 연결 되었다.

 

반응형
Posted by J-sean
:
반응형

Detect, compute and draw key points.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <opencv2/opencv.hpp>
 
using namespace std;
using namespace cv;
 
int main(int argc, char** argv)
{
    Mat src = imread("Source.jpg", IMREAD_GRAYSCALE);
    
    if (src.empty()) {
        cerr << "Image load failed!" << endl;
        
        return -1;
    }
 
    Ptr<Feature2D> feature = ORB::create();
    // static Ptr<ORB> cv::ORB::create(int nfeatures = 500, float scaleFactor = 1.2f, int nlevels = 8,
    // int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, ORB::ScoreType scoreType = ORB::HARRIS_SCORE,
    // int patchSize = 31, int fastThreshold = 20)
 
    vector<KeyPoint> keypoints;
    feature->detect(src, keypoints);
    // Detects keypoints in an image (first variant) or image set (second variant).
 
    Mat desc;
    feature->compute(src, keypoints, desc);
    // Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
 
    cout << "keypoints.size(): " << keypoints.size() << endl;
    cout << "desc.size(): " << desc.size() << endl;
 
    Mat dst;
    drawKeypoints(src, keypoints, dst, Scalar::all(-1), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
    // Draws keypoints.
 
    imshow("src", src);
    imshow("dst", dst);
 
    waitKey();
    
    return 0;
}




Sizes of keypoints and descriptors.


Source image.


Keypoints with sizes and orientations.


반응형
Posted by J-sean
: