최근 글
HW

[XIAO] Seeed Studio Xiao nRF52 구성

References Getting Started with XIAO nRF52840 | Seeed Studio WikiGetting Started with Seeed Studio XIAO SAMD21 | Seeed Studio Wiki1. 보드 : XIAO BLE nRF52840 (Sense) 보드 개발을 위한 첫 시작은 메인 내용을 참고하면 된다. Arduino 에서 보드 설정과 PC의 Serial 포트를 설정하고 example 코드로 테스트를 수행한다.nRF52840 보드와 nRF52840 (Sense)보드의 차이는 마이크와 IMU 센서의 유무이다. 2. DFU  모드 전환하기펌웨어를 업로드하기 위해서는 DFU(Device Firmware Update)모드로 전환을 해야한다. 기본적으로 업로드를 하면 ..

HW

[MCU] 펌웨어 인터페이스 및 디버거 정리

1. 인터페이스 (USB, JTAG, SWD, ISP)펌웨어 인터페이스는 프로그램을 빌드후 펌웨어를 업로드하거나 업로드 후 실시간 코드 실행을 통해서 디버깅을 하는데 사용되는 인터페이스 프로토콜을 말한다.펌웨어 업로드만 되거나 디버깅이 함께 가능한 인터페이스로 나뉘는데 이를 비교한다. 주요 비교는 JTAG 와 SWD가 있는데, 소프트웨어 디버깅만을 위해서는 SWD가 가격적으로다 핀수로나 가장 합리적인 선택이 된다. 다만, Boundary Scan 등의 하드웨어 디버깅이 필요한 경우에만 JTAG를 사용하도록 한다. 좀 더 자세한 내용은 접은글을 확인.더보기DFU (Device Firmware Upgrade)정의:DFU는 USB 인터페이스를 통해 장치의 펌웨어를 업그레이드할 수 있는 표준화된 프로토콜입니다...

VTK

[VTK] Mesh Smoothing Filters

GPT 답변vtkSmoothPolyDataFilter와 vtkWindowedSincPolyDataFilter 두 필터는 모두 VTK (Visualization Toolkit)에서 제공하는 메쉬 스무딩(정점 위치 조정을 통한 표면 평활화) 기능을 수행하지만, 각기 다른 알고리즘과 특성을 가지고 있습니다. 이들의 주요 차이점을 이해하는 것은 특정 응용 프로그램에 적합한 필터를 선택하는 데 중요할 수 있습니다.vtkSmoothPolyDataFilter알고리즘: vtkSmoothPolyDataFilter는 간단한 래플라시안 스무딩 기법을 사용합니다. 이 방법은 각 정점을 그 이웃 정점의 평균 위치로 이동시킴으로써 메쉬를 평활화합니다. 이 과정은 여러 번 반복될 수 있으며, 각 반복은 스무딩의 정도를 증가시킵니다..

C#

[OxyPlot] C# Custom Command Binding

1. Command 정의 및 Binding Oxyplot의 PlotController 에 원하는 이벤트에 대한 Command를 Binding 한다. 이를 위해서 어떤 데이터를 변수로 handle 할지를 정의한 Delegate를 선언한다. 그리고 원하는 이벤트에 Binding 을 한다. private PlotController BuildMainPlotcontroller() { var plotController = new PlotController(); // plotController.UnbindAll(); // Custom Command 함수를 위한 Delegate를 정의한다. HeatmapClicked = new DelegatePlotCommand((view, controller, args) => Hea..

C#

[C#] Setting Service with Configuration

1. 개요 Setting Service 를 구현하기 위해 사용되는 Package를 비교 분석한다. System.Configuration.ConfigurationManager 와 Microsoft.Extensions.Configuration 의 기능을 비교한다. 더보기 1. Historical Context: System.Configuration.ConfigurationManager: Part of the older .NET Framework. Commonly used to read settings from App.config for desktop apps and Web.config for ASP.NET apps. Built primarily for a world where apps had a single..

Developments
VTK

[VTK] Mesh Smoothing Filters

GPT 답변vtkSmoothPolyDataFilter와 vtkWindowedSincPolyDataFilter 두 필터는 모두 VTK (Visualization Toolkit)에서 제공하는 메쉬 스무딩(정점 위치 조정을 통한 표면 평활화) 기능을 수행하지만, 각기 다른 알고리즘과 특성을 가지고 있습니다. 이들의 주요 차이점을 이해하는 것은 특정 응용 프로그램에 적합한 필터를 선택하는 데 중요할 수 있습니다.vtkSmoothPolyDataFilter알고리즘: vtkSmoothPolyDataFilter는 간단한 래플라시안 스무딩 기법을 사용합니다. 이 방법은 각 정점을 그 이웃 정점의 평균 위치로 이동시킴으로써 메쉬를 평활화합니다. 이 과정은 여러 번 반복될 수 있으며, 각 반복은 스무딩의 정도를 증가시킵니다..

VTK

[VTK] VTK File Extension

1. 개요 VTK 에서 지원하는 파일 타입을 알아본다. 2. 지원 파일 File Extension Description Data Types .vtk Legacy VTK format. Stores a wide range of data types in either ASCII or binary format. Structured and unstructured grids, polygons, images .vti VTK XML Image Data format. Stores structured points or image datasets. Structured points, images .vtp VTK XML PolyData format. Stores polygonal data. Polygons .vtu VTK XML..

VTK

[VTK] Painting Mask Image 생성하기

1. 개요 입력된 원본 이미지의 Painting 작업을 위해서는 Mask 용 이미지데이터가 필요하다. 이를 위해 원본 이미지에 맞는 Painting Mask 용 이미지 데이터를 생성하고 임의의 영역에 대한 초기값을 입력하는 것을 알아본다. 2. Painting Source 만들기 Masking 용으로 사용되는 이미지는 Compoenent가 1이며 unsigned char 타입의 scalar type을 갖는다. 원본이미지의 Spacing, Dimension, Origin만 참고하여 새로운 이미지 데이터를 만들면 된다. public void CreatePaintingSourceImageData() { paintData = vtkImageData.New(); paintData.SetOrigin(0, 0, 0)..

VTK

[VTK] Modified 심화

1. 개요 Pipeline에서 Modified 가 발생할 경우 이루어지는 내부 workflow를 분석한다. 2. 연결된 Pipeline 구성도 3. Pipeline 동작 분석 Interactor 이벤트를 통해 Mask의 픽셀을 변경하고 Modified()를 호출하면 내부적으로 RenderWindow의 Render를 실행하는데 이때 Modified 가 있는 Filter가 있으므로 다음과 같은 순서로 Pipeline이 동작한다. Mask:vtkImageCanvasSource2D에서 Modified를 호출하고 Rendering을 하면 Modified 된 Pipeline 에 영향을 받는 하위 Pipeline filter들은 Progress Start -> Progress[n] -> Progress End 순으로..

VTK

[VTK] Image Mask Filter

1. 개요 vtkImageMask Filter의 기본적인 사용 방법을 알아본다. 2. vtkImageMaskFilter Mask filter는 source image 와 mask 이미지간의 중첩되는 픽셀만을 최종 결과 값으로 출력하는 filter이다. 주의할 점은 source image의 채널은 상관없지만 mask image는 component 가 1인 1채널 이미지여야 한다. Masking 은 단순히 0이면 원본 이미지가 통과하지 못하고 0이 아닌 값이면 통과하여 원본이미지 픽셀 값이 그대로 표현된다. Mask filter에는 NotMaskOn을 설정함으로써 Mask를 invser로 적용할 수도 있다. 3. 코드 및 Pipeline 구성 구현한 테스트 코드의 중요 부분과 pipeline의 연결도이다. ..

Programming
C#

[OxyPlot] C# Custom Command Binding

1. Command 정의 및 Binding Oxyplot의 PlotController 에 원하는 이벤트에 대한 Command를 Binding 한다. 이를 위해서 어떤 데이터를 변수로 handle 할지를 정의한 Delegate를 선언한다. 그리고 원하는 이벤트에 Binding 을 한다. private PlotController BuildMainPlotcontroller() { var plotController = new PlotController(); // plotController.UnbindAll(); // Custom Command 함수를 위한 Delegate를 정의한다. HeatmapClicked = new DelegatePlotCommand((view, controller, args) => Hea..

C#

[C#] Setting Service with Configuration

1. 개요 Setting Service 를 구현하기 위해 사용되는 Package를 비교 분석한다. System.Configuration.ConfigurationManager 와 Microsoft.Extensions.Configuration 의 기능을 비교한다. 더보기 1. Historical Context: System.Configuration.ConfigurationManager: Part of the older .NET Framework. Commonly used to read settings from App.config for desktop apps and Web.config for ASP.NET apps. Built primarily for a world where apps had a single..

C#

[C#] Logging 서비스 활용하기

1. 개요 로깅 서비스를 통합관리하는 시스템으로 편리하게 소프트웨어 로깅을 기록하자. 2. 소개 여기에서는 .Net에서 사용할 수 있는 로깅 서비스로 NLog를 사용하려고 한다 간단한 설정에서 Dependency Injection 을 활용할 예정이다. 3. 구현하기 우선 Package 는 NLog와 NLog.Extension.Logging이 필요하다. NLog를 사용하기 위해서 Configuration 파일을 등록해야하는데 두가지 방법을 사용할 수 있다. # Configuration Config | NLog (nlog-project.org) NLog.config vs. appsettings.json 작성하는 방식의 차이일뿐 큰차이는 없다. 다만 NLog.config 를 사용할 경우에는 복잡한 layout..

C#

WPF Behavior.Wpf

버튼을 Click 한 이벤트를 ViewModel 의 Command 에 binding 하고, 이때 CommandParameter를 전달하는 방법이다. 이 때 전달하는 Parameter는 string 으로 입력을 하므로, 다른 타입으로 변환하여 전달하고 싶으면 Coverter를 정의해야한다. 간단하게 string to double converter를 구현하고 이를 CommandParameter의 내부 converter 속성에 conveter를 입력한다. 1, 2의 tag의 경우에는 CommandParameter는 string 으로만 입력할 수 있으므로, 매개변수를 string 또는 object 를 갖는 command 와 연결할 수 있다. 다른 것은 전달되는 타입만 다를뿐 값은 동일하다. 3번은 Command..

C#

Wpf dialog service

개별 view를 이용한 dialog Creating a dialog service in an MVVM application is a great way to show different types of dialogs (e.g., messaging, prompts, information windows) without directly depending on specific views from the ViewModel. This allows you to maintain separation of concerns and avoid tightly coupling the ViewModel to the UI. Here's a step-by-step guide on building a dialog service: 1. **..

RichardBang
로봇을 품은 개발자 이야기