Find Jobs
Hire Freelancers

OpenCV error with Numpy 3d array

$30-250 USD

In Progress
Posted over 4 years ago

$30-250 USD

Paid on delivery
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]()
Project ID: 23520688

About the project

2 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $43 USD for this job
User Avatar
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,Data Minning, C++, C#, NS3 simulation, Omnet++, Sumo simulation, Deep Learning, Computer Vision, AI text analysis model,and Reinforcement Learning. While working in the domains mentioned above, I have worked used frameworks like TensorFlow, Scikit-learn, PyTorch,STP and UDP, Caffe2, OpenCV, Keras, matplotlib, seaborn, fastai, Pycharm,NILM algorithms etc) I am also very familiar with classification and clustering algorithms such as SVM,FHMM, Combinatorial Optimization, HART 85 Algorithm, Maximum Likelihood Estimation, KNN, LDA, Fuzzy classification I’m honest, creative and a unique person to carry out your tasks given to me. Leaving your project on our hand is privileged; we'll make sure that the project is done in a perfect way and do our best until you were satisfied. I would love to discuss this project with you and meet your exact requirements. I am confident I can provide you with top-notch materials that will fit your needs. I'm proud of my work on being professional, of the highest quality and always delivered on time
$30 USD in 2 days
4.1 (8 reviews)
4.5
4.5
User Avatar
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 in 2 days
5.0 (8 reviews)
3.1
3.1

About the client

Flag of CHINA
Yanji, China
5.0
2
Member since Sep 22, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.