In [1]: import cv2 from cv2 import dnn_superres # Create an SR object sr = dnn_superres.DnnSuperRes Impl_create() # Read a satalite image image = cv2.imread('1212. PNG|" ) # Read the EDSR desired model path = "EDSR_x3.pb" sr.readModel(path) # Set the desired model and scale to get correct pre- and post-processing sr.setlodel("edsr", 3) # new clearer image generated result = sr.upsample(image) # Save the image cv2. imurite("1212.PNG", result) ImportError lAppData\Local\Temp/ipykernel_22892/954647835.py in 1 import cv2 -> 2 from cv2 import dnn_superres Traceback (most recent call last) 3 4 # Create an SR object 5 sr = dnn_superres. DnnSuperResImpl_create() ImportError: cannot import name 'dnn_superres' from 'cv2' (C: \Users\aemyo\anaconda3\lib\site-packages\cv2\_init_-py)
In [1]: import cv2 from cv2 import dnn_superres # Create an SR object sr = dnn_superres.DnnSuperRes Impl_create() # Read a satalite image image = cv2.imread('1212. PNG|" ) # Read the EDSR desired model path = "EDSR_x3.pb" sr.readModel(path) # Set the desired model and scale to get correct pre- and post-processing sr.setlodel("edsr", 3) # new clearer image generated result = sr.upsample(image) # Save the image cv2. imurite("1212.PNG", result) ImportError lAppData\Local\Temp/ipykernel_22892/954647835.py in 1 import cv2 -> 2 from cv2 import dnn_superres Traceback (most recent call last) 3 4 # Create an SR object 5 sr = dnn_superres. DnnSuperResImpl_create() ImportError: cannot import name 'dnn_superres' from 'cv2' (C: \Users\aemyo\anaconda3\lib\site-packages\cv2\_init_-py)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
What code in python can fix this?
![In [1]: import cv2
from cv2 import dnn_superres
# Create an SR object
sr = dnn_superres.DnnSuperResImpl_create()
# Read a satalite image
image = cv2.imread('1212. PNG| )
# Read the EDSR desired model
path = "EDSR x3.pb"
sr.readModel(path)
# Set the desired model and scale to get correct pre- and post-processing
sr.setModel("edsr", 3)
# new clearer image generated
result - sr.upsample(image)
# Save the image
cv2.imwrite("1212. PNG", result)
Traceback (most recent call last)
IпрortError
\AppData\Local\Temp/ipykernel_22892/954647835. py in <module>
1 import cv2
2 from cv2 import dnn_superres
3
4 # Create an SR object
5 sr = dnn_superres.DnnSuperResImpl_create()
ImportError: cannot import name 'dnn_superres' from 'cv2' (c: \Users\aemyo\anaconda3\lib\site-packages\cv2\_init_-py)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F977deaf5-0de1-460e-926e-b3669c9f70ff%2F9fdaa6e2-715f-4744-873b-58ecc3dd43e1%2Fw18wxcb_processed.png&w=3840&q=75)
Transcribed Image Text:In [1]: import cv2
from cv2 import dnn_superres
# Create an SR object
sr = dnn_superres.DnnSuperResImpl_create()
# Read a satalite image
image = cv2.imread('1212. PNG| )
# Read the EDSR desired model
path = "EDSR x3.pb"
sr.readModel(path)
# Set the desired model and scale to get correct pre- and post-processing
sr.setModel("edsr", 3)
# new clearer image generated
result - sr.upsample(image)
# Save the image
cv2.imwrite("1212. PNG", result)
Traceback (most recent call last)
IпрortError
\AppData\Local\Temp/ipykernel_22892/954647835. py in <module>
1 import cv2
2 from cv2 import dnn_superres
3
4 # Create an SR object
5 sr = dnn_superres.DnnSuperResImpl_create()
ImportError: cannot import name 'dnn_superres' from 'cv2' (c: \Users\aemyo\anaconda3\lib\site-packages\cv2\_init_-py)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY