I was able to do this, but suddenly imwrite no longer outputs the image to the save location.
It seems that the image can be read.
I don't know how to deal with it because there is no error.
import cv2 import math, csv import numpy as np import scipy.ndimage as ndimage from matplotlib import pyplot as plt #Load input image inputfolder = r "C: \ Users \ s170101 \ Desktop \ python_filar \ NS \ 1903847 \ 9_PK2000_MgO" inputfile = "09-1-10.jpg" image = cv2.imread (inputfolder + "/" + inputfile) gray = cv2.cvtColor (image, cv2.COLOR_RGB2GRAY) outputfile = r "C: \ Users \ s170101 \ Desktop \ python_filar \ NS \ 1903847 \ 9_PK2000_MgO" cv2.imwrite (outputfile + "/1_raw.jpg", gray)
Answer # 1
outputfileAt the beginning of the r string, there are two special symbols for bidirectional text called U + 202A "Left-to-right embedding (LRE)".
input folderIt is not included in the r string of, so please copy and paste it again.
- python - image recognition with keras
- python - i want to find the height information of each pixel in the image
- python - i want to load graph data created with pyplot as image data without saving it
- python - arguments are passed even though the function inside the function is not in parentheses
- python - phenomenon that looks immutable even though it should be immutable
- python - (tensorflow) please tell me how to save and output image data mnist
- python hdf5 how to add to saved data (how to use mode ='a')
- python image display error beginner, thank you
- how to save the image ocr result file in python
- python - confusion matrix display in image recognition on cnn
- python - about image deletion in django
- python - tkinter photo image question
- python - image recognition using cnn keras multiple inputs
- python - i want to read an image and display it
- python - i want to divide the read image into pixels and label them
- python - i want to create a contour image
- python - i want to display an image with pysimplegui, but an error occurs
- python 3x - i want to save the csv file saved by jupyter lab on the desktop
- file not found error even though python file exists