feat: Send refined images to the screen #6
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@LeeSungNo-ian
Outline
Work Contents
Trouble Point
1. Converting
CVPixelBuffer
toUIImage
(CVPixelBuffer
를UIImage
로 변환해야됩니다..)CGContext
(변환하려면CGContext
를 사용해야됩니다.)UnsafeMutableRawPointer
requires a memory address value. The address value was obtained by fixing the image address of the pixel using theCVPixelBufferLockBaseAddress
.(UnsafeMutableRawPointer
에는 메모리 주소 값이 필요합니다. 주소 값은 'CVPixelBufferLockBaseAddress'를 사용하여 픽셀의 이미지 주소를 고정하여 얻었습니다.)CGColorSpace
hat specifies how to interpret a color value for display. The space was designated usingCGColorSpaceCreateDeviceRGB
, but I used this function because I thought it was not important for this project, although color values may appear differently for each device.(CGColorSpace
는 디스플레이에 색상을 표현하는 방법을 지정해주어야합니다 . 그래서CGColorSpace
를 'CGColorSpaceCreateDeviceRGB'를 이용해 기기의 값을 사용하도록 지정했습니다. 기기마다 색값이 다르게 나타날 수 있지만 이번 프로젝트에서는 중요하지 않다고 생각이 들어 이 기능을 사용했습니다.premultipliedFirst
inCGImageAlphaInfo
and the byeorder via thebyeOrder32Big
in theCGBitmapInfo
. And use it in combination using thebit OR operator
.(비트맵은 픽셀의 조합으로 그려진 이미지 표현방법입니다. CGImageAlphaInfo의 'premultiplevedFirst'를 통해 RGBA 값을, CGBitmapInfo의 'byOrder32Big'를 통해 byteorder를 설정해줍니다. 그리고 '비트 OR 연산자'를 사용하여 조합하여 사용했습니다.)