Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
공백 변경 숨기기
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
텍스트 스타일
모양 변경
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
cam1_5_diff
생성일
2년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
5 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
9 행
복사
48 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
52 행
복사
복사
복사됨
복사
복사됨
from picamera2 import Picamera2,
Preview
from picamera2 import Picamera2,
MappedArray
from time import sleep
from libcamera import Transform
from libcamera import Transform
복사
복사됨
복사
복사됨
import cv2, time
resolution = (800, 600)
def apply_text(request):
# Text options
colour = (255, 255, 255)
origin = (0, 60)
font = cv2.FONT_HERSHEY_SIMPLEX
scale = 1
thickness = 1
# text = "17082024 09:07"
# Get the current time in the format "DDMMYYYY HH:MM"
text = time.strftime("%d%m%Y %H:%M")
# Calculate the text size
text_size, _ = cv2.getTextSize(text, font, scale, thickness)
# Calculate the bottom-right origin
x = resolution[0] - text_size[0] - 10 # 10 pixels padding from the right
y = resolution[1] - 10 # 10 pixels padding from the bottom
origin = (x, y)
with MappedArray(request, "main") as m:
cv2.putText(m.array, text, origin, font, scale, colour, thickness)
복사
복사됨
복사
복사됨
# Create camera object
picam2 = Picamera2()
picam2 = Picamera2()
복사
복사됨
복사
복사됨
picam2.start_preview(Preview.QTGL
, transform=Transform(hflip=True, vflip=True))
picam2.start()
# Create two separate configs - one for preview and one for capture.
sleep(2)
# Make sure the preview is the same resolution as the capture, to make
# sure the overlay stays the same size
capture_config = picam2.create_still_configuration({"size": resolution}
, transform=Transform(hflip=True, vflip=True))
preview_config = picam2.create_preview_configuration({"size": resolution}, transform=Transform(hflip=True, vflip=True))
# Set the current config as the preview config
picam2.configure(preview_config)
# Add the timestamp
picam2.pre_callback = apply_text
# Start the camera
picam2.start(show_preview=True)
time.sleep(2)
# Switch to the capture config and then take a picture
image = picam2.switch_mode_and_capture_file(capture_config, "timeOnPhoto.jpg")
# Close the camera
picam2.close()
picam2.close()
저장된 비교 결과
원본
파일 열기
from picamera2 import Picamera2, Preview from time import sleep from libcamera import Transform picam2 = Picamera2() picam2.start_preview(Preview.QTGL, transform=Transform(hflip=True, vflip=True)) picam2.start() sleep(2) picam2.close()
수정본
파일 열기
from picamera2 import Picamera2, MappedArray from libcamera import Transform import cv2, time resolution = (800, 600) def apply_text(request): # Text options colour = (255, 255, 255) origin = (0, 60) font = cv2.FONT_HERSHEY_SIMPLEX scale = 1 thickness = 1 # text = "17082024 09:07" # Get the current time in the format "DDMMYYYY HH:MM" text = time.strftime("%d%m%Y %H:%M") # Calculate the text size text_size, _ = cv2.getTextSize(text, font, scale, thickness) # Calculate the bottom-right origin x = resolution[0] - text_size[0] - 10 # 10 pixels padding from the right y = resolution[1] - 10 # 10 pixels padding from the bottom origin = (x, y) with MappedArray(request, "main") as m: cv2.putText(m.array, text, origin, font, scale, colour, thickness) # Create camera object picam2 = Picamera2() # Create two separate configs - one for preview and one for capture. # Make sure the preview is the same resolution as the capture, to make # sure the overlay stays the same size capture_config = picam2.create_still_configuration({"size": resolution}, transform=Transform(hflip=True, vflip=True)) preview_config = picam2.create_preview_configuration({"size": resolution}, transform=Transform(hflip=True, vflip=True)) # Set the current config as the preview config picam2.configure(preview_config) # Add the timestamp picam2.pre_callback = apply_text # Start the camera picam2.start(show_preview=True) time.sleep(2) # Switch to the capture config and then take a picture image = picam2.switch_mode_and_capture_file(capture_config, "timeOnPhoto.jpg") # Close the camera picam2.close()
비교하기