python(39)
-
[ C# ] Class 생성자
■ class // 추가 > 클래스 추가 항목 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace aaa { public class Student { private string name; private string Address; public Student(string name, string Address) { this.name = name; this.Address = Address; } public Student(string name):this(name,null) { } public Student():this(null) { } pu..
2023.01.25 -
[ C# ] 상속
■ 상속 대상 : 클래스 목적 : 클래스의 재사용 > 코드량 줄이기 위해 상속 클래스의 역할 부모 클래스 : 상속을 하는 클래스 자식 클래스 : 상속을 받는 클래스 상속 관계 표시 및 형식 class A // Parent Class { private protected public } Class B : A // Child Class { } // B에서 접근할 수 있는 것? : protected , public // Main과 같은 외부에서 접근 ? : public using System; namespace sangsok { class A { private void PrintPrivate() { Console.WriteLine("private"); } protected void PrintProtected()..
2023.01.13 -
[ C# ] CLASS
■ CLASS 변수와 메서드를 그룹화한 것 주요 개념 그룹화를 위해 class 키워드와 형식 사용 new 연산자로 생성하여 사용 new를 사용하지 않으면 같은 클래스 참조할 수 있는 변수가 됨( 클래스 참조 변수) 클래스를 new를 통해 생성하면 객체가 됨 인스턴스와 객체의 관계 , 인스턴스는 본질 , 객체는 실물인 형상 A test1 = new A(); A test2 = new A(); //좌측은 object , 우측은 instance //즉 , 같은 A 인스턴스를 가지는 test1과 test2 객체 ■class 형식과 접근 한정자 //클래스 형식 struct struct_name { } --------------------------------------------- //구조체 형식 class cla..
2023.01.11 -
[ C# ] 배열
1. 배열 기본 개념 : 데이터형 [] 배열명; ex ) int[] array_name; 참조형 new를 통해 생성 Array로부터 파생된 참조형 foreach 사용 가능 행과 열, 면은 콤마(,)로 구분 선언 형식 데이터형[,] 배열명; 데이터형[, , ] 배열명; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace pratice1 { class Program { static void Main(string[] args) { int[] nArray = { 1, 2, 3, 4 }; for (int i = 0; i <..
2023.01.09 -
[ OpenCV ] DeepLearning - Mnist 활용
● mnist 활용하여 Flatten() 결합 결과와 Conv2D 결합 사용 결과 첫번째모델 Flatten()을 초기에 사용한 모델 학습 from keras.utils import to_categorical X_train=mnist[0][0] X_test=mnist[1][0] y_train=mnist[0][1] y_test=mnist[1][1] y_train_m=to_categorical(y_train) y_test_m=to_categorical(y_test) model=Sequential() model.add(Flatten()) model.add(Dense(64,activation='relu')) model.add(Dense(10,activation='softmax')) model.compile(opt..
2022.11.30 -
[ OpenCV ] Optical Flow
◆Optical Flow 이미지의 빛의 패턴의 가시적인 움직임을 말한다. 카메라와 움직임과 물체의 움직임이 영향을 줄 수 있다. Optical flow를 계산하기 위해서는 이미지들 사이에 시간적 연속성과 이미지 내의 점들과 그 이웃하는 점들 사이의 공간적인 연속성이 있다는 가정이 필요하다. Optical flow는 이차원 Vector field의 모습으로 표현된다. Optical Flow는 움직임을 탐지하는 것과 관련된 motion segmentation을 비롯해 비디오 인코딩과 같은 많은 분야 까지 폭넓게 적용될 수 있다. ◇단점 같은 이미지 내에서 움직임이 있더라도, 빛이 변화하는 경우에 취약하다 큰 움직임에 취약하다 좋은 Feature를 찾을 수 없는 경우 동작하지 않는다 조리개(Aperture) ..
2022.11.25