Python Image Splicing Numpy Sub Image Extraction
$10-30 USD
Paid on delivery
Hi,
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 = []
i=0
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])
i+=1
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()
Project ID: #17520334
About the project
14 freelancers are bidding on average $63 for this job
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
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
Hello. I have read your project description carefully. I have good skills in Python and i can do it. Contact me please. Thanks...
I have extensive experience with Python, Python Image Processing (PIL), Pandas, and Open CV, Quality code with minimum price is guaranteed. Mike IT Geek
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.
https://www.freelancer.com/projects/Python/Qualitative-Comparative-Study-Face-13933384/ https://www.freelancer.com/projects/php/License-Plate-Detection-With-Chinese/ done the similar jobs lets chat
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.