Python Image Splicing Numpy Sub Image Extraction


I have an image, say 1280 x 720.

I want to extract 64x64 sized samples. However, I want them extracted on an offset, so it is not a simple 1280 / 64

Basically I want to recreate the new image using the inner 50x50 pixels of the extracted 64x64 sized samples.

Here is what I have tried so far, but seem to be failing:

patch_size = 64

bordersize = 5

patch_stride = patch_size - (bordersize*2)

new_image_width = 1280

new_image_height = 720

test = [login to view URL]('C:/images/[login to view URL]')

test = [login to view URL]((new_image_width, new_image_height), [login to view URL])

test = [login to view URL](test)

test = [login to view URL](test, 0, 255)

subimages = []

#pieces = generate_tiles(test, patch_size, patch_stride)

for x in range(bordersize, new_image_width-bordersize-patch_stride):

for y in range(bordersize, new_image_height-bordersize-patch_stride):

if (x % (patch_stride+bordersize) == 0) or (x == bordersize):

if (y % (patch_stride+bordersize) == 0) or (y == bordersize):

subimage = test[x:x+patch_stride, y:y+patch_stride]

if (y<(10*patch_size)) and (x<(10*patch_size)):

[login to view URL](subimage)

subgroup = []


full_image = []

for y in range(0, int([login to view URL](len(subimages)))):

for x in range(0, int([login to view URL](len(subimages)))):

[login to view URL](subimages[i])


combined = [login to view URL](subgroup)

[login to view URL](combined)

subgroup = []

full_image = [login to view URL](full_image)

test = [login to view URL]([login to view URL](full_image)).show()

Skills: C Programming, C++ Programming, Machine Learning, Python, Software Architecture

See more: numpy slicing, numpy slice 2d array, numpy reshape, numpy extract, python read image into numpy array, python slice 2d array, array slicing python, python image to numpy array, image extraction, remove sub category image sub category page cre, save image table sql server 2005 using parameter, image preview file upload aspnet using vbnet, photoshop image extraction, python csv extraction, python image recognize, python image crawler, extraction image 3gp, python image processing website snapshot, image sub image silverlight, website image extraction

About the Employer:
( 23 reviews ) Clawson, United States

Project ID: #17520334

19 freelancers are bidding on average $59 for this job


I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ More

$80 USD in 2 days
(149 Reviews)

hello it seems like a quick Python problem however I can't try your code right away, but firstly I have a question about your 'recreate' purpose, are you trying to use the 50x50 and execute some up-sampling to get the More

$55 USD in 1 day
(127 Reviews)

Hello, I can help with you in your project Python Image Splicing Numpy Sub Image Extraction I have more than 5 years of experience in C Programming, C++ Programming, Machine Learning, Python, Software Architectur More

$120 USD in 2 days
(54 Reviews)

---Very Nice Job. Professional Image Processing & Python & Machine Learning expert. Best result in time----- [login to view URL] I read your description very carefully. I am very interesting for your project because I hav More

$30 USD in 1 day
(64 Reviews)

Hello, sir Your job is exciting me. Let me do this job for you now just to prove my expertise in this field. Hope I could awake you interest in me. I am always online, work hard and very sensitive to details. Thank More

$35 USD in 1 day
(54 Reviews)

I have extensive experience with Python, Python Image Processing (PIL), Pandas, and Open CV, Quality code with minimum price is guaranteed. Mike IT Geek

$20 USD in 1 day
(42 Reviews)

Hello. I have read your project description carefully. I have good skills in Python and i can do it. Contact me please. Thanks...

$100 USD in 1 day
(23 Reviews)

Hello Having experience of python, I can do what you want. Python is my primary programming language. let us discuss details in chat.

$30 USD in 1 day
(31 Reviews)

I have already finished your task. I need you to explain me more about the bordersize and patch stride in case i didn't understand something correctly. The code is ready so i wait your response for more details.

$25 USD in 1 day
(16 Reviews)
silicolabs done the similar jobs lets chat

$172 USD in 1 day
(5 Reviews)

I did master degree in Image Processing and Computer Vision. I can do this job with quite ease. Looking forward for a great relation. Thank you very much in advance.

$30 USD in 3 days
(5 Reviews)

Hi. Nice to meet you. I've been developing and teaching algorithms with Python for several years.(See my profile) If you do contact me, it would be the good opportunity to get a better result than expected. I'm loo More

$122 USD in 3 days
(1 Review)

Dear employer. I am honourable to bid your project of all. I read your project description and understand clearly. Do you want "PERFECT RESULT"? I always work fast and perfectly. For your project, I demonstrat More

$30 USD in 1 day
(1 Review)
$50 USD in 2 days
(0 Reviews)
$25 USD in 1 day
(0 Reviews)

Hi, If you just needed all the image to be resized and then cropped to 64 x 64 then get the central 50 x 50 of the 64 x 64 image and add a border (or no border). I did that already for you in the link below you can More

$30 USD in 1 day
(0 Reviews)
$35 USD in 1 day
(0 Reviews)
$27 USD in 3 days
(0 Reviews)
$111 USD in 1 day
(0 Reviews)