Завершено

OpenCV error with Numpy 3d array

I am using this project to perform super resolution: [login to view URL]

I want to use the high resolution image with OpenCV, but it keeps failing. I edited some parts of the code to return the variable 'image' in the method do_for_file. The object is a ndarray of floats of shape (x,y,3), I am assuming in an RGB image, but I am not sure.

The error comes when I use: img_gris = [login to view URL](imgSR, cv2.COLOR_RGB2GRAY)

[login to view URL]: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/[login to view URL]: error: (-2:Unspecified error) in function 'cv::impl::{anonymous}::CvtHelper<VScn, VDcn, VDepth, sizePolicy>::CvtHelper(cv::InputArray, cv::OutputArray, int) [with VScn = cv::impl::{anonymous}::Set<3, 4>; VDcn = cv::impl::{anonymous}::Set<1>; VDepth = cv::impl::{anonymous}::Set<0, 2, 5>; cv::impl::{anonymous}::SizePolicy sizePolicy = (cv::impl::<unnamed>::SizePolicy)2u; cv::InputArray = const cv::_InputArray&; cv::OutputArray = const cv::_OutputArray&]'

> Unsupported depth of input image:

> 'VDepth::contains(depth)'

> where

> 'depth' is 6 (CV_64F)

I tried to convert the floats to int, but then it showe the next error:

img_gris = [login to view URL](img, cv2.COLOR_BGR2GRAY)

[login to view URL]: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/[login to view URL]: error: (-2:Unspecified error) in function 'cv::impl::{anonymous}::CvtHelper<VScn, VDcn, VDepth, sizePolicy>::CvtHelper(cv::InputArray, cv::OutputArray, int) [with VScn = cv::impl::{anonymous}::Set<3, 4>; VDcn = cv::impl::{anonymous}::Set<1>; VDepth = cv::impl::{anonymous}::Set<0, 2, 5>; cv::impl::{anonymous}::SizePolicy sizePolicy = (cv::impl::<unnamed>::SizePolicy)2u; cv::InputArray = const cv::_InputArray&; cv::OutputArray = const cv::_OutputArray&]'

> Unsupported depth of input image:

> 'VDepth::contains(depth)'

> where

> 'depth' is 4 (CV_32S)

I want to use the high resolution image in my code without saving a .jpg file and calling [login to view URL]()

Квалификация: Python, Deep Learning, Machine Learning (ML), Алгоритмы, Программирование на C++

Показать больше fatal error call member function set_file non object, fatal error call member function getlanguagecode non object, fatal error call member function attributes non object, fatal error call member function set_snapshot non object, fatal error call member function count_wishlist non object, fatal error call member function validate non object, fatal error call member function setemailvalue non object, fatal error call member function addtochildgroup non object, fatal error call member function getusername non object, fatal error call member function setorderfilter non object, fatal error call member function setfieldnameprefix non object, fatal error call member function getposition non object, fatal error call member function getattributecode non object, fatal error call member function getstore non object, fatal error call member function setquote non object, fatal error call member function setrenderer non object, fatal error call member function getblockname non object, error unknown column array field list, fatal error call member function setmethod non object

О работодателе:
( 2 отзыв(-а, -ов) ) Yanji, China

ID проекта: #23520688

Поручен:

mostshalaby

Hi. I am very familiar with Python, OpenCV and Machine Learning. Based on my good knowledge on this field, I can be sure I can fix the bug in a few hours. Let's discuss further via chat. Kind regards. Mostafa.

$50 USD за 1 день
(9 отзывов(-а))
3.9

5 фрилансеров(-а) в среднем готовы выполнить эту работу за $83

onyx00programmer

Hello. I have read your project details before placing my bid. I can assure you that I can deliver high quality work on time. I am willing to start immediately. Thank you very much.

$140 USD за 7 дней(-я)
(7 отзывов(-а))
3.2
omoboladeolumode

Hello sir/ma, I'm interested in taking this task up for you. I have extensive experience in the domains of Natural Language Processing, Image Recognition & Artificial Intelligence,Recommender Systems,Machine learning,D Больше

$30 USD за 2 дней(-я)
(2 отзывов(-а))
2.5
reyzeal

Hi, I'm python programmer and I've experience using OpenCV in many projects. I think that you need to rearrange the ndarray so it will suitable to OpenCV Image. I hope I can help you to fix your code.

$55 USD за 2 дней(-я)
(6 отзывов(-а))
2.6
mldevstar

Hello, dear! Nice to meet you! I have read your requirements carefully and I am very interested in your project. I am confident of this project as I'm a professional OpenCV expert with over 5 years of experience. It se Больше

$140 USD за 7 дней(-я)
(1 отзыв)
2.6