Ask Your Question

Revision history [back]

A javascript Error:cv2.error:OpenCv(4.2.0)

image description

The part of the code that gives error:

import ezdxf import numpy import cv2 import argparse #Daha sonra kodu geliştirebilmek için from flask import request import sys

fpath = sys.argv[1] path = r'fpath'

def converter(masked_jpg): a= (0,0,0) b= (200,200,200) doc = ezdxf.new('R2010') msp = doc.modelspace() opened_jpg = cv2.imread(fpath) masked_jpg = cv2.inRange(opened_jpg, a, b) #Renk aralığı belirlenir for i in range(0,masked_jpg.shape[0]): for j in range(0,masked_jpg.shape[1]): if masked_jpg[i][j] == 255: #Renk siyah olunca msp.add_line((j,masked_jpg.shape[0] - i), (j,masked_jpg.shape[0] - i))
doc.saveas('output_dxf.dxf')

converter(fpath) print("oldu") sys.stdout.flush()

Pls help me!

A javascript Error:cv2.error:OpenCv(4.2.0)

image description

The part of the code that gives error:

import ezdxf
import numpy
import cv2
import argparse #Daha sonra kodu geliştirebilmek için
from flask import request
import sys

sys fpath = sys.argv[1] path = r'fpath'

r'fpath' def converter(masked_jpg): a= (0,0,0) b= (200,200,200) doc = ezdxf.new('R2010') msp = doc.modelspace() opened_jpg = cv2.imread(fpath) masked_jpg = cv2.inRange(opened_jpg, a, b) #Renk aralığı belirlenir for i in range(0,masked_jpg.shape[0]): for j in range(0,masked_jpg.shape[1]): if masked_jpg[i][j] == 255: #Renk siyah olunca msp.add_line((j,masked_jpg.shape[0] - i), (j,masked_jpg.shape[0] - i))
doc.saveas('output_dxf.dxf')

doc.saveas('output_dxf.dxf') converter(fpath) print("oldu") sys.stdout.flush()

sys.stdout.flush()

Pls help me!

click to hide/show revision 3
None

updated 2020-06-30 01:03:42 -0500

berak gravatar image

A javascript Error:cv2.error:OpenCv(4.2.0)

image description

The part of the code that gives error:

import ezdxf
import numpy
import cv2
import argparse #Daha sonra kodu geliştirebilmek için
from flask import request
import sys

fpath = sys.argv[1]
path = r'fpath'



def converter(masked_jpg):
    a= (0,0,0)
    b= (200,200,200)
    doc = ezdxf.new('R2010')
    msp = doc.modelspace() 
    opened_jpg = cv2.imread(fpath)
    masked_jpg = cv2.inRange(opened_jpg, a, b) #Renk aralığı belirlenir
    for i in range(0,masked_jpg.shape[0]):
        for j in range(0,masked_jpg.shape[1]):
            if masked_jpg[i][j] == 255: #Renk siyah olunca
                msp.add_line((j,masked_jpg.shape[0] - i), 
                (j,masked_jpg.shape[0] - i))            
                doc.saveas('output_dxf.dxf')


converter(fpath)
print("oldu")
sys.stdout.flush()

Pls help me!

click to hide/show revision 4
No.4 Revision

updated 2020-06-30 01:22:57 -0500

berak gravatar image

A javascript Error:cv2.error:OpenCv(4.2.0)cv2.error:OpenCv(4.2.0)

image description

The part of the code that gives error:

import ezdxf
import numpy
import cv2
import argparse #Daha sonra kodu geliştirebilmek için
from flask import request
import sys

fpath = sys.argv[1]
path = r'fpath'



def converter(masked_jpg):
    a= (0,0,0)
    b= (200,200,200)
    doc = ezdxf.new('R2010')
    msp = doc.modelspace() 
    opened_jpg = cv2.imread(fpath)
    masked_jpg = cv2.inRange(opened_jpg, a, b) #Renk aralığı belirlenir
    for i in range(0,masked_jpg.shape[0]):
        for j in range(0,masked_jpg.shape[1]):
            if masked_jpg[i][j] == 255: #Renk siyah olunca
                msp.add_line((j,masked_jpg.shape[0] - i), 
                (j,masked_jpg.shape[0] - i))            
                doc.saveas('output_dxf.dxf')


converter(fpath)
print("oldu")
sys.stdout.flush()

Pls help me!