Newest

anshumanpatha avatar
anshumanpatha
terrificBlueWhippet
HTTP
An interactive, runnable TypeScript val by anshumanpatha
0
rahul97 avatar
rahul97
ardentVioletSwordfish
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
ChaitanMajhi9006 avatar
ChaitanMajhi9006
clearSilverMarten
Script
import pytesseract from pytesseract import Output from PIL import Image import cv2 import os Tesseract का पथ (सुनिश्चित करें कि Tesseract इंस्टॉल हो) pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe' इमेज प्रोसेसिंग के लिए फंक्शन def process_image(image_path, output_format="txt"): try: # इमेज को लोड करें और प्रोसेस करें image = cv2.imread(image_path) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # नॉइज़ रिमूवल processed_image = cv2.GaussianBlur(gray, (5, 5), 0) # OCR से टेक्स्ट पहचान text_data = pytesseract.image_to_string(processed_image, lang="eng+hin+ben", config='--psm 6') # टेक्स्ट फॉर्मेट करना print("\nExtracted Text:\n", text_data) # आउटपुट फॉर्मेट के अनुसार फाइल सेव करना if output_format == "txt": with open("output_text.txt", "w", encoding="utf-8") as file: file.write(text_data) print("Text saved as 'output_text.txt'.") elif output_format == "pdf": pdf_output = pytesseract.image_to_pdf_or_hocr(processed_image, extension='pdf') with open("output_document.pdf", "wb") as file: file.write(pdf_output) print("PDF saved as 'output_document.pdf'.") except Exception as e: print("Error:", e) इमेज का पथ image_path = "sample_image.jpg" # अपनी इमेज का पथ दें output_format = "pdf" # 'txt' या 'pdf' में से चुनें फंक्शन को कॉल करें process_image(image_path, output_format)
0
ChaitanMajhi9006 avatar
ChaitanMajhi9006
strivingGrayMarmot
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
maxm avatar
maxm
passkeys_demo
HTTP
Forked from stevekrouse/passkeys_demo
0
maxm avatar
maxm
eccentricJadeSeahorse
Script
Forked from valfs/eccentricJadeSeahorse
0
testbug001 avatar
testbug001
ableAquamarineAntlion
Script
288e6adc-b157-4e5b-b359-fec5839d9eee
0
valfs avatar
valfs
nurturingPeachBoa
Script
0d113ae4-9989-4e77-b62e-c0f480874df9
0
valfs avatar
valfs
upbeatMaroonSawfish
Script
b37eadac-39d0-4d71-8ea4-5957c6710075
0
valfs avatar
valfs
worthyOliveBobolink
Script
ce317e9e-d7a7-436f-9e5d-8f6a9af38557
0