2019년 3월 1일 금요일

Visual Studio 2017 노트

목적: Visual Studio 2017(이하 vs17) 로 opencv 를 사용하고 싶다.

1. opencv library를 찾아야 한다.
    1) 어떤 opencv version 을 사용할 것인지 정한다  
        - 기본 기능이 동작하는지 확인하는 것이므로 아무 version 상관없다.
        - vs17을 사용해야 하므로 vs17 지원하는 version이 필요하다. 
             + vs17 은 vc15(Visual Studio Compiler 15?) 를 써야 한다.
        -> 3.4.3 은 vs17 지원하므로 사용하기로 했다.
    2) opencv를 빌드 한다.
        - 배포되는 opencv 들은 필요한 binary 가 모두 빌드된 것이 아니라 추가된 기능한 빌드된 것이기 때문에 직접 빌드를 해야한다.
        - x64 컴퓨터라고 x64 실행하려고 하면 안된다 왜냐하면 dll 들이 거의 다 x86 이기 때문?
        - CMake/vs17 로 빌드하면 vs17 프로젝트 generate 가능하며 이 프로젝트로 빌드하면 필요한 dll 들을 생성할 수 있다. 이것들로 프로그램 실행하면 된다.
         - cmake 사용 방법
             https://stackoverflow.com/questions/43786856/how-can-i-install-configure-opencv3-2-0-with-c-visual-studio-2017
2. 빌드를 한 후에는 링크에 모든 lib 파일이름을 적어준다.

목적: Visual Studio Debug

debug 시작해도 관련 dll 을 로딩하는데 시간이 걸릴 수 있다.

2019년 2월 12일 화요일

2019년 1월 27일 일요일

Jordan Peterson | Full Address and Q&A | Oxford Union (Script)

Youtube Link: https://www.youtube.com/watch?v=UZMIbo_DxJk&t=2346s

'19/01/27
Open Remark - 00:00:52 ~ 00:11:11

Open Remark
So I'm going to talk to you today a little bit about hierarchy.
it's a small talk that I've been developing as I've been doing my public lectures over the last couple of weeks.
it's an elaboration(정교함) of some of the ideas I put forth in or some of my scientific writing in maps of meaning but more particularly in 12 rules for life and Rule one which is stand up straight with your shoulders back.
and it's in part of meditation on hierarchy
and I want to talk about the political significance of that and that you know how I've been trying to sort that out in my own imagination.
so I am going to put.. and I think it sheds light on(해결의 실마리를 던져주다) on the political on the nature of political debate itself and maybe deeper light on why temperamental(신결질적) factors might contribute to political political Framing and perception.
because we know that people tend to vote their temperament
although there are other reasons that influence their political allegiance(충성) and their voting behavior so let's start with a couple of simple observations

the first is that complex biological creatures and even simple biological creatures for that matter have to move forward in the world and so that's the case for any creature that's mobile and that goes all the way down to one celled organisms the idea that approach and avoidance are the fundamental motivations isn't very old biological idea and seems to apply across levels of analysis in the in the animal kingdom
and it is true for us as well
we have to move forward towards things because we have requirements there are things that we require to Keep Us Alive and to keep us wanting to be alive as well
and and those are different things and we move forward towards things that we value

so the two propositions there
the first is that we have to move forward because there are things to move forward to because there are things we need and want and the
second is that to move forward towards something is simultaneously value it and so one of the implications of that is that we always live in a framework a value there's no escaping that
and it removed for a detail that this out quite substantially in my book maps of meaning but we're always at my place and and and we're always moving towards a place that in principle has some advantage over the place we at
otherwise we move towards it and so what that means is that there's no life without value
at least there's no human life without value out of necessity
and also not only out of necessity at the physiological level but also out of necessity at the psychological level because another thing that you might point out that I think is usually pointed out has been not only do you have to move from point A to B in life but point A is often a very difficult place to be
because we're fragile and bounded and mortal and limited and because we know that and

so one of the implications of that as many great religious Traditions are paint to illustrate or demonstrate or Proclaim is that life is essentially suffering and I believe that to be a fundamental truth but but perhaps not the most fundamental truth because I think the most fundamental truth is that despite the fact that life is suffering people can transcend that and partly the way they transcend that is by pursuing things of value and so that if there is no value proposition at hand then you have no meaning to justify the difficult conditions of your life and that's brutally difficult for people

no Nietzsche said he who has a why can bear any how 

and you see and then I certainly seen this at the clinical practitioner that people who have no purpose in their life are embittered by the difficulties of their life and they become first bitter and then resentful and then revengeful and then cruel and there's plenty of places to go past cruel that's just where you start if you're really on a downhill path all right

so the so this is the first propositions

the second proposition would be well if you're going to pursue something of value because you're a social creature you're going to pursue that thing of value in the social space and
that means you're going to compete and cooperate with people around you in the pursuit of that value
what that inevitably means is that given that the pursuit of anything valuable is going to be a collective Enterprise
that you're going to produce a hierarchy or maybe more than one harder to bet
at least A hierarchy of competence in relationship to that Pursuit so it doesn't matter what you decide to pursue
maybe you're going to do that cooperatively run to find that you and other people very in your ability to manage that Pursuit effectively and and efficiently and so there's going to be a hierarchy of people from voting
maybe it's delivering massages maybe it's delivering groceries maybe it's setting up an Enterprise
it doesn't matter but if it's valuable Purdue pursued and you pursue it socially going to produce a hierarchy and the hierarchy is going to be one of confidence

and so if you're going to pursue value then you're going to construct a hierarchy and then there's an implication from that which is that if you construct a hierarchy most of the people within that hierarchical structure are a minority of people are going to be fantastically successful at the pursuit and a very large number going to stack up at the bottom and that's a manifestation of what's known as prices laws map by the Pareto rule distribution it's an expression of what's be known Among The Economist says the Matthew principle from the New Testament

to those who have everything more will be given from those who have nothing everything will be taken away and it's an it's an iron law of the distribution of success in hierarchy

so if you're going to have value and you're going to have hierarchy then you're going to have inequality and that's a problem now

you can't so now you have a clinical divide there so the conservative type say but we need to hierarchies and that's self-evident as far as I'm concerned given that set of propositions because if you don't ever going to pursue something of value which you have to and need to then you're going to produce a hierarchy so if you demolish the hierarchies you demolished value itself and that's not a tenable a tenable move the left wing no says your credit yeah but

you have to be very careful with your hierarchies because they tend towards inequality of distribution that's one problem once they're established they always also tend to a form of tyranny because once a hierarchy of confidence has been established it can be invaded by people who use power as the means to attain status in the hierarchy and that can corrupt and and destroyed even the entire hierarchy so we have to be on guard for that plus if your hierarchy becomes too Steep and its distribution so it's two tiny fraction of people at the top and two great an agglomeration of people at the bottom especially under conditions of genuine privation  then the people at the bottom it's not only unjust, unfair producing  access suffering at the bottom have nothing to lose might as well just put the hierarchy on its end and that's not a good way to produce a sustainable Society you don't want to put people in the position where they have nothing to lose especially if you have something to lose but also with regards to principles of fairness and Justice let's say so it seems to me that that's a decent way of conceptualizing the political landscape and that gives that gives you a conceptual framework within which you can put people on the left and right in their proper position the right
basically is that portion of the population that's temperamentally who's temperamental proclivity is to admire and support hierarchies and work effectively with in them and that's actually the personality traits that make up a conservative because conservatives by temperament are low in trade openness which is a creativity Dimension that's associated with lateral thinking it's not I would say it's a very environmentally underdetermined

it's it's it's a biological predisposition(성향) especially with regards to creativity and high in conscientiousness(성실성) and the conservative temperamental types make very good managers and administrators that's how they manifest themselves in the world essentially if you set up a hierarchy and it runs on algorithmic runs algorithmically then the conservatives will do very well in that structure because they can Implement an algorithm into a very good at implementing where is
the liberal types are very good at generating new hierarchies and so and that's and that's because they're hiring trade open if they're less conscientious(양심적인) so they're not suited as well to do within hierarchy operation but

in a functioning economy and in a functioning democracy I would say you need both types you need to Liberal types to establish new territory and to put out new values so that new hierarchies might be organized so that the effective movement towards those ends might be instantiated and you need the conservatives to actually implement the processes and so a society's only conservatives become Static and that's not good because the environment transforms and you have to keep up with a society that's only composed of the left-leaning liberal types is very good at generating all sorts of new possibilities but very bad at generating all sorts of new actualities and so we should be first of all cognizant(알고 있는) of the fact that hierarchical organization is escapable if you're also going to pursue value second that if you produce hierarchical structures that you're going to produce inequality inevitably and there are negative consequences as a as a function of that and that the end of both sides of that equation let's say need need a voice because both of those functions are are valuable necessary but also add odds with one another and that permanent odds Because it is the case that you need hierarchies because otherwise you have nothing to do and it's also the case that if you have hierarchies then the poor will always be with you and that's a that's a that's a chronic(만성적인) functional problem that has to be addressed and that's the proper place I would say of the left

so that's only 15 minutes

2018년 12월 12일 수요일

Byte Order

인텔계열 PC 에서는 Byte단위로 Little Endian 이다.
Sensor 단위에서는 Big Endian 이다.

그래서 PC 에서 읽은 다음에 무조건 방향을 바꾸어 주어야 한다.

2018년 12월 4일 화요일

Windows 10 DotNet 3.5설치


참조 링크
https://social.technet.microsoft.com/Forums/azure/en-US/8bc98626-42de-4d7e-9fc1-2bc8658cc47b/net-framework-35-installation-fails-w-error-code-0x800f0954?forum=win10itprosetup

관련 사진



2018년 6월 1일 금요일

모두 같은 값으로


1. Macro Code
    - cell merge
Sub register_merge()

' register_merge 매크로

Set r = ActiveCell
Dim i As Integer
    For i = 1 To 1000
        If Selection.Offset(1, 0) <> "" Then
            Selection.Offset(1, 0).Select
        Else
            Selection.End(xlDown).Select
            Selection.Offset(-1, 0).Select
            Range(Selection, Selection.End(xlUp)).Select
            Selection.Merge
            Selection.Offset(1, 0).Select
        End If
    Next i
End Sub

2. 빈칸을 모두 같은 값으로
홈 - 편집 - 찾기 및 선택 - 이동옵션 - blank

제일 위의 cell 에 넣을 수식 입력한 다음 ctrl + enter

2018년 5월 21일 월요일

pclk

pclk: Pixel CLocK

Camera interface

The CAMIF, also the Camera Interface block is the hardware block that interfaces with different image sensor interfaces and provides a standard output that can be used for subsequent image processing.

A typical Camera Interface would support at least a parallel interface although these days many camera interfaces are beginning to support the MIPI CSI interface.

The camera interface's parallel interface consists of the following lines :-

8 to 12 bits parallel data line

These are parallel data lines that carry pixel data. The data transmitted on these lines change with every Pixel Clock (PCLK).
Horizontal Sync (HSYNC)

This is a special signal that goes from the camera sensor or ISP to the camera interface. An HSYNC indicates that one line of the frame is transmitted.
Vertical Sync (VSYNC)

This signal is transmitted after the entire frame is transferred. This signal is often a way to indicate that one entire frame is transmitted.
Pixel Clock (PCLK)

This is the pixel clock and it would change on every pixel.
NOTE: The above lines are all treated as input lines to the Camera Interface hardware.

Example
Let us suppose that a sensor is transmitting a VGA frame 640x480. The video frame is of a format RGB888. Let's assume that we have a camera sensor transmitting 8 bits per pixel clock (PCLK). This means to transfer one pixel of data, 3 PCLKs would be required. The HSYNC would be fired by the sensor after every 640 x 3, 1920 PCLKs. A VSYNC would be fired by the sensor after the entire frame is transmitted i.e. after 1920x480, 921600 PCLKs.
센서가 VGA 프레임 640x480을 전송한다고 가정 해 봅시다. 비디오 프레임은 RGB888 형식입니다. 우리가 픽셀 클록 (PCLK) 당 8 비트를 전송하는 카메라 센서를 가지고 있다고 가정 해 봅시다. 이것은 한 픽셀의 데이터를 전송하는 것을 의미하며, 3 개의 PCLK가 필요합니다. HSYNC는 640 x 3, 1920 PCLK마다 센서에 의해 발사됩니다. VSYNC는 전체 프레임이 전송 된 후 즉 1920x480, 921600 PCLK 이후에 센서에 의해 시작됩니다.

The camera interface's hardware block (that could be a part of any SOC) would constantly monitor the above lines to see if the sensor has transmitted anything. A typical camera interface would come with some internal buffering and would also have an associated DMA to transfer the image to the destination memory. The buffer would capture the incoming pixels to temporarily buffer them, and using the DMA the pixels would be transferred (probably line by line) through multiple burst DMA transfers to a destination address in the memory (pre programmed by the camera interface driver programmer). The camera interface's programmer interface might also give a facility of issuing hardware interrupts upon the receipt of the HSYNC, VSYNC signals to the host micro-controller. This could serve as a useful trigger for DMA reprogramming if required.
카메라 인터페이스의 하드웨어 블록 (SOC의 일부일 수 있음)은 센서가 아무 것도 전송하지 않았는지 확인하기 위해 위의 라인을 지속적으로 모니터링합니다. 전형적인 카메라 인터페이스는 약간의 내부 버퍼링을 가지며 이미지를 대상 메모리로 전송하는 관련 DMA를 갖습니다. 버퍼는 들어오는 픽셀을 캡처하여 일시적으로 버퍼에 저장하고, DMA를 사용하면 메모리의 대상 주소 (카메라 인터페이스 드라이버 프로그래머가 사전 프로그래밍 한)로 다중 버스트 DMA 전송을 통해 픽셀이 전송됩니다. 카메라 인터페이스의 프로그래머 인터페이스는 호스트 마이크로 컨트롤러에 대한 HSYNC, VSYNC 신호 수신시 하드웨어 인터럽트를 발행하는 기능을 제공 할 수도 있습니다. 필요할 경우 DMA 재 프로그래밍을위한 유용한 트리거 역할을 할 수 있습니다.