Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with list
#1
Hi,
I have a problem with my array list in pyhton while using cv2.
I have an array list that looks like that:
A=[[[RGB],[RGB]],....,[[RGB],[RGB]]]
A[i] = heigh of the image
A[][j] = the lenght of the picture
I need to shorten the heigh and the lenght of A,
to do so
A=A[a:b] (with [a,b] the only portion i need)
and i'd like to do :
for i in range(len(A)):
     A[i]=A[i][c:d] #(to shorten each A[i] the portion i need)
but it doesn't work as it doesn't do what i'd suppose it'd do... is there is a way to remove those unwanted part ? (because del and remove doesn't work as for del, it's an array and it doesn't like it, and for remove i don't know what color is in that pixel so i can't remove the specific pixel i don't want...

Yuky
Reply


Messages In This Thread
Problem with list - by yukysky - Apr-24-2019, 04:23 PM
RE: Problem with list - by ichabod801 - Apr-24-2019, 04:53 PM
RE: Problem with list - by yukysky - Apr-24-2019, 05:10 PM
RE: Problem with list - by ichabod801 - Apr-24-2019, 05:20 PM
RE: Problem with list - by yukysky - Apr-24-2019, 05:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with "Number List" problem on HackerRank Pnerd 5 2,155 Apr-12-2022, 12:25 AM
Last Post: Pnerd

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020